| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# Run the upstream test suite without the upstream Makefile, because: |
| 4 |
# - we want to test the installed version of foomuuri |
| 5 |
# - autopkgtests should not change the source tree, and might not have |
| 6 |
# write access to it |
| 7 |
# - Linters should not be run from autopkgtests |
| 8 |
|
| 9 |
set -ex |
| 10 |
|
| 11 |
out=$(mktemp -d) |
| 12 |
if [ ! -d "$out" ]; then |
| 13 |
echo "Unable to create temporary directory" |
| 14 |
exit 1 |
| 15 |
fi |
| 16 |
|
| 17 |
cd test |
| 18 |
for t in ??-*; do |
| 19 |
if [ "$t" = "70-iplist" ]; then |
| 20 |
continue # fails on i386 / timestamp problem |
| 21 |
fi |
| 22 |
/sbin/foomuuri --set=etc_dir="$t" \ |
| 23 |
--set=share_dir=../etc \ |
| 24 |
--set=state_dir="$out" \ |
| 25 |
--set=run_dir="$out" \ |
| 26 |
check |
| 27 |
diff -u "$t"/golden.txt "$out"/next.fw |
| 28 |
done |
| 29 |
|
| 30 |
rm -rf "$out" |