From c0be64d694364c47698f5e83c9c15cafa42a924c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 6 May 2020 11:55:22 +0200 Subject: [PATCH] bug hunting test: adjust itc test script for older python 3.x that does not allow format strings --- test/bug-hunting/itc.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/bug-hunting/itc.py b/test/bug-hunting/itc.py index a249687d1..0c8951be6 100644 --- a/test/bug-hunting/itc.py +++ b/test/bug-hunting/itc.py @@ -17,11 +17,11 @@ else: if len(sys.argv) >= 2 and sys.argv[-1] != '--clang': TESTFILE = sys.argv[-1] - if not os.path.isfile(TESTFILE): - print(f'ERROR: {TESTFILE} is not a file') - sys.exit(1) else: TESTFILE = os.path.expanduser('~/itc/01.w_Defects/zero_division.c') +if not os.path.isfile(TESTFILE): + print('ERROR: %s is not a file' % TESTFILE) + sys.exit(1) RUN_CLANG = ('--clang' in sys.argv) @@ -75,6 +75,7 @@ for w in wanted: if w not in actual: missing.append(w); print('missing:' + str(missing)) - +if len(missing) > 0: + sys.exit(1)