Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid recompile-attempts for failed instruments #1792

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tools/Python/mctest/mctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down