diff --git a/scripts/mbedtls_dev/test_case.py b/scripts/mbedtls_dev/test_case.py index a6ed8fc90d..c476d1ee9a 100644 --- a/scripts/mbedtls_dev/test_case.py +++ b/scripts/mbedtls_dev/test_case.py @@ -17,6 +17,7 @@ # limitations under the License. import binascii +import os import sys from typing import Any, Iterable, List, Optional import typing_extensions #pylint: disable=import-error @@ -98,7 +99,7 @@ def write_data_file(filename: str, If the file already exists, it is overwritten. """ if caller is None: - caller = sys.argv[0] + caller = os.path.basename(sys.argv[0]) with open(filename, 'w') as out: out.write('# Automatically generated by {}. Do not edit!\n' .format(caller))