ArchiSys/TP/TP2/rendu/make.sh
2024-04-19 09:05:42 +02:00

25 lines
421 B
Bash
Executable File

#!/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