diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-02 18:37:36 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-03 10:25:03 +0200 |
| commit | b8d17736ce2c85174a47c7200ef6d19a51d0c347 (patch) | |
| tree | e62a8eb0c2ccf05be9b0b0791915e9aa1fca46e8 /test | |
| parent | 8d3fe446815a1631876e4170747bc6cb03a6bbf8 (diff) | |
| download | nissy-core-b8d17736ce2c85174a47c7200ef6d19a51d0c347.tar.gz nissy-core-b8d17736ce2c85174a47c7200ef6d19a51d0c347.zip | |
Do not run make clean automatically on every build and other Makefile changes
Diffstat (limited to 'test')
| -rwxr-xr-x | test/test.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/test.sh b/test/test.sh index 14b4ca3..a675286 100755 --- a/test/test.sh +++ b/test/test.sh | |||
| @@ -5,7 +5,6 @@ re="${TEST:-$@}" | |||
| 5 | TESTBIN="test/run" | 5 | TESTBIN="test/run" |
| 6 | TESTOUT="test/last.out" | 6 | TESTOUT="test/last.out" |
| 7 | TESTERR="test/last.err" | 7 | TESTERR="test/last.err" |
| 8 | CUBEOBJ="debugcube.o" | ||
| 9 | 8 | ||
| 10 | for t in test/*; do | 9 | for t in test/*; do |
| 11 | if [ -n "$re" ] && !(echo "$t" | grep -q "$re"); then | 10 | if [ -n "$re" ] && !(echo "$t" | grep -q "$re"); then |
| @@ -14,7 +13,7 @@ for t in test/*; do | |||
| 14 | 13 | ||
| 15 | # Verify if $t is a directory and if its name starts with three digits | 14 | # Verify if $t is a directory and if its name starts with three digits |
| 16 | if [ -d "$t" ] && basename "$t" | grep -Eq '^[0-9]{3}'; then | 15 | if [ -d "$t" ] && basename "$t" | grep -Eq '^[0-9]{3}'; then |
| 17 | $CC -o $TESTBIN "$t"/*.c $CUBEOBJ || exit 1 | 16 | $CC -o $TESTBIN "$t"/*.c $OBJ || exit 1 |
| 18 | for cin in "$t"/*.in; do | 17 | for cin in "$t"/*.in; do |
| 19 | c=$(echo "$cin" | sed 's/\.in//') | 18 | c=$(echo "$cin" | sed 's/\.in//') |
| 20 | cout="$c.out" | 19 | cout="$c.out" |
| @@ -32,4 +31,3 @@ for t in test/*; do | |||
| 32 | done | 31 | done |
| 33 | 32 | ||
| 34 | echo "All tests passed!" | 33 | echo "All tests passed!" |
| 35 | rm -rf $TESTBIN $TESTOUT $TESTERR $CUBEOBJ | ||
