Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | #! /bin/bash |
| 2 | # SPDX-License-Identifier: GPL-2.0 |
| 3 | |
| 4 | make &> /dev/null |
| 5 | |
| 6 | for i in `ls tests/*.c`; do |
| 7 | testname=$(basename "$i" .c) |
| 8 | gcc -o tests/$testname -pthread $i liblockdep.a -Iinclude -D__USE_LIBLOCKDEP &> /dev/null |
| 9 | echo -ne "$testname... " |
| 10 | if [ $(timeout 1 ./tests/$testname 2>&1 | wc -l) -gt 0 ]; then |
| 11 | echo "PASSED!" |
| 12 | else |
| 13 | echo "FAILED!" |
| 14 | fi |
| 15 | if [ -f "tests/$testname" ]; then |
| 16 | rm tests/$testname |
| 17 | fi |
| 18 | done |
| 19 | |
| 20 | for i in `ls tests/*.c`; do |
| 21 | testname=$(basename "$i" .c) |
| 22 | gcc -o tests/$testname -pthread -Iinclude $i &> /dev/null |
| 23 | echo -ne "(PRELOAD) $testname... " |
| 24 | if [ $(timeout 1 ./lockdep ./tests/$testname 2>&1 | wc -l) -gt 0 ]; then |
| 25 | echo "PASSED!" |
| 26 | else |
| 27 | echo "FAILED!" |
| 28 | fi |
| 29 | if [ -f "tests/$testname" ]; then |
| 30 | rm tests/$testname |
| 31 | fi |
| 32 | done |