diff options
Diffstat (limited to 'test/full-pipeline/run-full-pipeline.sh')
-rwxr-xr-x | test/full-pipeline/run-full-pipeline.sh | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/test/full-pipeline/run-full-pipeline.sh b/test/full-pipeline/run-full-pipeline.sh index 25f7bf7..c5a1700 100755 --- a/test/full-pipeline/run-full-pipeline.sh +++ b/test/full-pipeline/run-full-pipeline.sh @@ -11,6 +11,7 @@ fail() { echo -e '[\e[1;31mFAIL\e[0m] '"$1:" "$2" + has_failure=1 } pass() { @@ -34,33 +35,33 @@ export ASM="$PWD/../../assembler" export DISASM="$PWD/../../disassembler" has_failure=0 -for first_stage_asm in *.asm ; do - first_stage_bin="$WORK/${first_stage_asm}-first_stage.bin" - second_stage_asm="$WORK/${first_stage_asm}-second_stage.asm" - second_stage_bin="$WORK/${first_stage_asm}-second_stage.bin" +for first_stage_asm in should-pass/*.asm ; do + t=$(basename "$first_stage_asm") + first_stage_bin="$WORK/${t}-first_stage.bin" + second_stage_asm="$WORK/${t}-second_stage.asm" + second_stage_bin="$WORK/${t}-second_stage.bin" # Assemble test code if ! $VALGRIND $VALGRIND_OPTS "$ASM" "$first_stage_asm" "$first_stage_bin" ; then - fail "$first_stage_asm" "first stage assembly failed" + fail "$t" "first stage assembly failed" continue fi # Disassemble test code and re-assemble that disassembly if ! $VALGRIND $VALGRIND_OPTS "$DISASM" "$first_stage_bin" "$second_stage_asm" ; then - fail "$first_stage_asm" "first stage disassembly failed" + fail "$t" "first stage disassembly failed" continue fi if ! $VALGRIND $VALGRIND_OPTS "$ASM" "$second_stage_asm" "$second_stage_bin" ; then - fail "$first_stage_asm" "second stage assembly failed" + fail "$t" "second stage assembly failed" continue fi # first stage bin and second stage identical for test pass if diff "$first_stage_bin" "$second_stage_bin" >/dev/null; then - pass "$first_stage_asm" + pass "$t" else - fail "$first_stage_asm" "binary mismatch" - has_failure=1 + fail "$t" "binary mismatch" fi done |