Changeset 353f395 for src/examples


Ignore:
Timestamp:
May 31, 2016, 10:21:29 AM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
f43a200
Parents:
a6b7480
Message:

tests now return different exit code based on whether test fail or not

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/runTests.sh

    ra6b7480 r353f395  
    3636make clean > /dev/null 2>&1
    3737
     38ret_val=0
     39
    3840for test in $tests; do
    3941        echo -n "    $test" | tee -a $logfile
     
    4143        # build, skipping to next test on error
    4244        if ! make -j 8 $test > tests/$test.make.txt 2>&1; then
     45                ret_val=1
    4346                echo -e "\tFAILED with build error:" | tee -a $logfile
    4447                cat tests/$test.make.txt | tee -a $logfile
     
    5053        ./$test < tests/$test.in.txt > tests/$test.run.txt 2>&1
    5154        if ! diff tests/$test.out.txt tests/$test.run.txt > tests/$test.diff.txt; then
     55                ret_val=1
    5256                echo -e "\tFAILED with output mismatch:" | tee -a $logfile
    5357                cat tests/$test.diff.txt | tee -a $logfile
     
    5862        echo -e "\tPASSED" | tee -a $logfile
    5963done
     64
     65exit $((ret_val))
Note: See TracChangeset for help on using the changeset viewer.