Skip to content

Commit

Permalink
Merge branch 'prism'
Browse files Browse the repository at this point in the history
  • Loading branch information
davexparker committed Jan 10, 2024
2 parents eb9c295 + 95ce0f0 commit 77f2587
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions prism/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -602,21 +602,21 @@ testyices:
# Optionally, extra arguments for prism-auto are picked up via variable TESTS_ARGS
tests: testslocal
@if [ -d ../prism-tests ]; then \
etc/scripts/prism-auto -t -m ../prism-tests -p bin/prism --nailgun --ngprism bin/ngprism $(TESTS_ARGS); \
etc/scripts/prism-auto -t -m ../prism-tests -p bin/prism --print-failures --nailgun --ngprism bin/ngprism $(TESTS_ARGS); \
else \
echo "Skipping tests"; \
fi

# Just display the command to run the test suite on this version of PRISM
# Optionally, extra arguments for prism-auto are picked up via variable TESTS_ARGS
testsecho:
@echo etc/scripts/prism-auto -t -m ../prism-tests -p bin/prism --nailgun --ngprism bin/ngprism $(TESTS_ARGS)
@echo etc/scripts/prism-auto -t -m ../prism-tests -p bin/prism --print-failures --nailgun --ngprism bin/ngprism $(TESTS_ARGS)

# Run local tests (in ./tests)
# Optionally, extra arguments for prism-auto are picked up via variable TESTS_ARGS
testslocal:
@if [ -d tests ]; then \
etc/scripts/prism-auto -t -m tests -p bin/prism --nailgun --ngprism bin/ngprism $(TESTS_ARGS); \
etc/scripts/prism-auto -t -m tests -p bin/prism --print-failures --nailgun --ngprism bin/ngprism $(TESTS_ARGS); \
else \
echo "Skipping local tests"; \
fi
Expand All @@ -629,7 +629,7 @@ testslocal:
testsfull:
etc/scripts/prism-auto -t -m ../prism-tests \
--skip-export-runs --skip-duplicate-runs --test-all -a ../prism-tests/all-engines.args --timeout 1m \
-p bin/prism --nailgun $(TESTS_ARGS);
-p bin/prism --print-failures --nailgun $(TESTS_ARGS);

##########################
# Building distributions #
Expand Down
10 changes: 8 additions & 2 deletions prism/etc/scripts/prism-auto
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,13 @@ def runPrism(args, bmArgs, dir=""):
for line in open(logFile, 'r').readlines():
if re.match('Error:', line):
printTestResult(line)
print("To see log file, run:")
print("edit " + logFile)
if (options.printFailures):
print("Failing test log file:")
for line in open(logFile, 'r').readlines():
print(line, end="")
else:
print("To see log file, run:")
print("edit " + logFile)
prismArgsPrint = list(prismArgs)
prismArgsPrint[0] = options.prismExec
print("To re-run failing test:")
Expand Down Expand Up @@ -1162,6 +1167,7 @@ parser.add_option("--skip-duplicate-runs", action="store_true", dest="skipDuplic
parser.add_option("--timeout", dest="timeout", metavar="N", default=None, help='Timeout for each PRISM run (examples values for N: 5 / 5s for seconds, 5m / 5h for minutes / hours)')
parser.add_option("--dd-warnings", action="store_true", dest="ddWarnings", default=False, help="Print the DD reference count warnings")
parser.add_option("--colour", dest="colourEnabled", metavar="X", type="choice", choices=["yes","no","auto"], default="auto", help="Whether to colour test results: yes, no, auto (yes iff in terminal mode) [default=auto]")
parser.add_option("--print-failures", action="store_true", dest="printFailures", default=False, help="Display logs for failing tests")
(options, args) = parser.parse_args()
if len(args) < 1:
parser.print_help()
Expand Down

0 comments on commit 77f2587

Please sign in to comment.