Skip to content

Commit 0b8d802

Browse files
committed
Avoid recompile-attempts for failed instruments
1 parent c05366f commit 0b8d802

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/Python/mctest/mctest.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,11 @@ def mccode_test(branchdir, testdir, limitinstrs=None, instrfilter=None, version=
221221
for test in tests:
222222
# if binary exists, set compile time = 0 and continue
223223
binfile = os.path.splitext(test.localfile)[0] + "." + mccode_config.platform["EXESUFFIX"].lower()
224-
if os.path.exists(binfile):
224+
failed=os.path.splitext(test.localfile)[0] + ".failed"
225+
if os.path.exists(failed):
226+
test.compiled = False
227+
test.compiletime = -1
228+
elif os.path.exists(binfile):
225229
test.compiled = True
226230
test.compiletime = 0
227231
else:
@@ -252,6 +256,9 @@ def mccode_test(branchdir, testdir, limitinstrs=None, instrfilter=None, version=
252256
else:
253257
formatstr = "%-" + "%ds: COMPILE ERROR using:\n" % maxnamelen
254258
logging.info(formatstr % test.instrname + cmd)
259+
f = open(failed, "a")
260+
f.write(formatstr % test.instrname + cmd)
261+
f.close()
255262
else:
256263
logging.info("Skipping compile of " + test.instrname)
257264
# save (incomplete) test results to disk

0 commit comments

Comments
 (0)