Changes in src/tests/runTests.sh [a725c99:1e37d4d]
- File:
-
- 1 edited
-
src/tests/runTests.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/runTests.sh
ra725c99 r1e37d4d 26 26 # current directory named the same; should also be an input file 27 27 # tests/$test.in.txt and expected output tests/$test.out.txt 28 # tests="vector_test avl_test"29 #30 # # log file for test output;31 # # reset at the beginning of each run32 # logfile=tests/log.txt33 # touch $logfile && rm $logfile34 #35 # # clean existing build artifacts before run36 # make clean > /dev/null 2>&137 #38 # ret_val=039 #40 # for test in $tests; do41 # echo -n " $test" | tee -a $logfile42 #43 # # build, skipping to next test on error44 # if ! make -j 8 $test > tests/$test.make.txt 2>&1; then45 # ret_val=146 # echo -e "\tFAILED with build error:" | tee -a $logfile47 # cat tests/$test.make.txt | tee -a $logfile48 # continue49 # fi50 # rm tests/$test.make.txt51 #52 # # run, testing against expected output53 # ./$test < tests/$test.in.txt > tests/$test.run.txt 2>&154 # if ! diff tests/$test.out.txt tests/$test.run.txt > tests/$test.diff.txt; then55 # ret_val=156 # echo -e "\tFAILED with output mismatch:" | tee -a $logfile57 # cat tests/$test.diff.txt | tee -a $logfile58 # continue59 # fi60 # rm tests/$test.run.txt tests/$test.diff.txt ./$test61 #62 # echo -e "\tPASSED" | tee -a $logfile63 # done64 #65 # exit $((ret_val))66 67 28 tests="vector_test avl_test" 68 29 69 # python test.py ${tests} 30 # log file for test output; 31 # reset at the beginning of each run 32 logfile=tests/log.txt 33 touch $logfile && rm $logfile 34 35 # clean existing build artifacts before run 36 make clean > /dev/null 2>&1 70 37 71 38 ret_val=0 39 40 for test in $tests; do 41 echo -n " $test" | tee -a $logfile 42 43 # build, skipping to next test on error 44 if ! make -j 8 $test > tests/$test.make.txt 2>&1; then 45 ret_val=1 46 echo -e "\tFAILED with build error:" | tee -a $logfile 47 cat tests/$test.make.txt | tee -a $logfile 48 continue 49 fi 50 rm tests/$test.make.txt 51 52 # run, testing against expected output 53 ./$test < tests/$test.in.txt > tests/$test.run.txt 2>&1 54 if ! diff tests/$test.out.txt tests/$test.run.txt > tests/$test.diff.txt; then 55 ret_val=1 56 echo -e "\tFAILED with output mismatch:" | tee -a $logfile 57 cat tests/$test.diff.txt | tee -a $logfile 58 continue 59 fi 60 rm tests/$test.run.txt tests/$test.diff.txt ./$test 61 62 echo -e "\tPASSED" | tee -a $logfile 63 done 64 72 65 exit $((ret_val))
Note:
See TracChangeset
for help on using the changeset viewer.