Skip to content

Commit

Permalink
Merge pull request katef#480 from katef/kate/retest-errors
Browse files Browse the repository at this point in the history
Missing error handling for retest(1)
  • Loading branch information
katef authored Jun 28, 2024
2 parents 0402f39 + b0d1de6 commit 14bbc0f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/retest/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ process_test_file(const char *filename,
exit(EXIT_FAILURE);
}

return num_errors;
return num_errors + num_re_errors;
}

static enum fsm_io
Expand Down
6 changes: 5 additions & 1 deletion src/retest/runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,12 @@ compile(enum implementation impl,
return 0;
}

if (0 != systemf("%s %s -shared %s -o %s",
if (0 != systemf("%s %s -shared %s %s -o %s",
cc ? cc : "gcc", cflags ? cflags : "",

// for "missing .note.GNU-stack section implies executable stack"
"-Wl,-z,noexecstack",

tmp_o, tmp_so))
{
return 0;
Expand Down
5 changes: 5 additions & 0 deletions tests/retest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ RETEST=${BUILD}/bin/retest
.for lang in vm asm c vmc
.for io in pair str

# XXX: we don't have FSM_IO_STR for asm yet
.if ${lang} != asm || ${io} != str

.for n in ${TEST.tests/retest:T:R:C/^tests_//}

${TEST_OUTDIR.tests/retest}/res-${lang}-${io}${n}: ${TEST_SRCDIR.tests/retest}/tests_${n}.tst
Expand All @@ -22,6 +25,8 @@ test:: ${TEST_OUTDIR.tests/retest}/res-${lang}-${io}${n}

.endfor

.endif

.endfor
.endfor

0 comments on commit 14bbc0f

Please sign in to comment.