From 0b8d802d815033cabc7b03f8754c77e6be438460 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Fri, 6 Dec 2024 12:05:56 +0100 Subject: [PATCH] Avoid recompile-attempts for failed instruments --- tools/Python/mctest/mctest.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/Python/mctest/mctest.py b/tools/Python/mctest/mctest.py index d6963a88af..8b690a36c0 100755 --- a/tools/Python/mctest/mctest.py +++ b/tools/Python/mctest/mctest.py @@ -221,7 +221,11 @@ def mccode_test(branchdir, testdir, limitinstrs=None, instrfilter=None, version= for test in tests: # if binary exists, set compile time = 0 and continue binfile = os.path.splitext(test.localfile)[0] + "." + mccode_config.platform["EXESUFFIX"].lower() - if os.path.exists(binfile): + failed=os.path.splitext(test.localfile)[0] + ".failed" + if os.path.exists(failed): + test.compiled = False + test.compiletime = -1 + elif os.path.exists(binfile): test.compiled = True test.compiletime = 0 else: @@ -252,6 +256,9 @@ def mccode_test(branchdir, testdir, limitinstrs=None, instrfilter=None, version= else: formatstr = "%-" + "%ds: COMPILE ERROR using:\n" % maxnamelen logging.info(formatstr % test.instrname + cmd) + f = open(failed, "a") + f.write(formatstr % test.instrname + cmd) + f.close() else: logging.info("Skipping compile of " + test.instrname) # save (incomplete) test results to disk