Sasha Levin | 878f968 | 2013-06-13 18:41:19 -0400 | [diff] [blame] | 1 | #! /bin/bash |
| 2 | |
| 3 | make &> /dev/null |
| 4 | |
| 5 | for i in `ls tests/*.c`; do |
Sedat Dilek | a189c01 | 2016-03-30 10:22:49 +0200 | [diff] [blame] | 6 | testname=$(basename "$i" .c) |
Sasha Levin | 878f968 | 2013-06-13 18:41:19 -0400 | [diff] [blame] | 7 | gcc -o tests/$testname -pthread -lpthread $i liblockdep.a -Iinclude -D__USE_LIBLOCKDEP &> /dev/null |
| 8 | echo -ne "$testname... " |
| 9 | if [ $(timeout 1 ./tests/$testname | wc -l) -gt 0 ]; then |
| 10 | echo "PASSED!" |
| 11 | else |
| 12 | echo "FAILED!" |
| 13 | fi |
Sedat Dilek | a189c01 | 2016-03-30 10:22:49 +0200 | [diff] [blame] | 14 | if [ -f "tests/$testname" ]; then |
| 15 | rm tests/$testname |
| 16 | fi |
Sasha Levin | 878f968 | 2013-06-13 18:41:19 -0400 | [diff] [blame] | 17 | done |
| 18 | |
| 19 | for i in `ls tests/*.c`; do |
Sedat Dilek | a189c01 | 2016-03-30 10:22:49 +0200 | [diff] [blame] | 20 | testname=$(basename "$i" .c) |
Sasha Levin | 878f968 | 2013-06-13 18:41:19 -0400 | [diff] [blame] | 21 | gcc -o tests/$testname -pthread -lpthread -Iinclude $i &> /dev/null |
| 22 | echo -ne "(PRELOAD) $testname... " |
| 23 | if [ $(timeout 1 ./lockdep ./tests/$testname | wc -l) -gt 0 ]; then |
| 24 | echo "PASSED!" |
| 25 | else |
| 26 | echo "FAILED!" |
| 27 | fi |
Sedat Dilek | a189c01 | 2016-03-30 10:22:49 +0200 | [diff] [blame] | 28 | if [ -f "tests/$testname" ]; then |
| 29 | rm tests/$testname |
| 30 | fi |
Sasha Levin | 878f968 | 2013-06-13 18:41:19 -0400 | [diff] [blame] | 31 | done |