25 lines
421 B
Bash
25 lines
421 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
test_failed () {
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
|
make build-tests
|
||
|
|
||
|
for file in build/test-fail-*; do
|
||
|
echo "===== $file =====";
|
||
|
$file &>/dev/null
|
||
|
if [ $? -eq 0 ]; then
|
||
|
echo "$file should have failed"
|
||
|
test_failed
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
for file in build/test-success-*; do
|
||
|
echo "===== $file =====";
|
||
|
$file &>/dev/null
|
||
|
if [ $? -ne 0 ]; then
|
||
|
echo "$file failed"
|
||
|
test_failed
|
||
|
fi
|
||
|
done
|