| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
LOGFILE="$AUTOPKGTEST_TMP/test.log" |
| 4 |
|
| 5 |
# copy tests to temporary directory, as current one might be read-only |
| 6 |
cp -a test "$AUTOPKGTEST_TMP" |
| 7 |
cd "$AUTOPKGTEST_TMP/test" |
| 8 |
|
| 9 |
# run tests |
| 10 |
for dir in filters |
| 11 |
do |
| 12 |
pushd $dir |
| 13 |
bash -x ./$dir.sh | tee -a "$LOGFILE" |
| 14 |
popd |
| 15 |
done |
| 16 |
|
| 17 |
echo "======================================" |
| 18 |
grep "TESTING" "$LOGFILE" |
| 19 |
echo "======================================" |
| 20 |
|
| 21 |
[ $(grep -c "TESTING ERROR" "$LOGFILE") -gt 0 ] && exit 1 |
| 22 |
|
| 23 |
exit 0 |