0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-11-08 23:27:15 -05:00

travis: don't stop on failure

Don't stop travis after a single test failure. It is better to run all
the tests and get a comprehensive list of failing tests.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel)
2025-10-10 10:55:11 -07:00
parent c0aec6969b
commit 2c71e67762
2 changed files with 13 additions and 4 deletions

View File

@@ -579,7 +579,7 @@ $(travis_version): version
printf 'NASM version %s compiled on ?\n' `cat version` > $@
travis: $(PROGS) $(travis_version)
-$(PYTHON3) travis/nasm-t.py run > travis.log
-$(PYTHON3) travis/nasm-t.py run --stop=n > travis.log
@if $(GREP) FAIL travis.log; then exit 1; else \
echo '=== All tests PASS ==='; fi

View File

@@ -29,6 +29,10 @@ for cmd in ['run']:
dest = 'test',
help = 'Run the selected test only',
required = False)
spp.add_argument('--stop',
dest = 'stop', default = 'y',
help = 'Stop immediately on failure (default "y")',
required = False)
for cmd in ['new']:
spp = sp.add_parser(cmd, help = 'Add a new test case')
@@ -109,7 +113,7 @@ args = parser.parse_args()
if args.cmd == None:
parser.print_help()
sys.exit(1)
sys.exit(64)
def read_stdfile(path):
with open(path, "rb") as f:
@@ -232,7 +236,7 @@ if args.cmd == 'list':
def test_abort(test, message):
print("\t%s: %s" % (test, message))
print("=== Test %s ABORT ===" % (test))
sys.exit(1)
sys.exit(2)
return False
def test_fail(test, message):
@@ -556,6 +560,7 @@ if args.cmd == 'new':
f.close()
if args.cmd == 'run':
errors = 0
desc_array = []
if args.test == None:
desc_array = collect_test_desc_from_dir(args.dir)
@@ -566,10 +571,14 @@ if args.cmd == 'run':
for desc in desc_array:
if test_run(desc) == False:
errors = 1;
if 'error' in desc and desc['error'] == 'over':
test_over(desc['_test-name'])
else:
test_abort(desc['_test-name'], "Error detected")
errors = 1
if args.stop == 'y':
test_abort(desc['_test-name'], "Error detected")
sys.exit(errors)
if args.cmd == 'update':
desc_array = []