1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#!/bin/sh
# If AUTOPKGTEST_TMP is set (autopkgtest and debian/tests/control)
# test the installed executable and interaction with debhelper.
# Else (make check)
# test the script in the source directory.
. ./test_helper.sh
top_source_dir=$(pwd)
host=$(dpkg-architecture -qDEB_HOST_ARCH )
if [ -n "${AUTOPKGTEST_TMP:-}" ]; then
tested_command='dh_builtusing --logorrheic'
test_dir="$AUTOPKGTEST_TMP"
else
rm -fr obj/unit-tests
tested_command="perl $top_source_dir/dh_builtusing --logorrheic"
test_dir="$top_source_dir/obj"
fi
for script in unit-tests/*; do
# Skip emacs backups.
case $script in
*~) continue ;;
esac
echo "Running $script"
test_subdir="$test_dir/$script"
mkdir -p "$test_subdir/debian"
cd "$test_subdir"
fake_changelog > debian/changelog
. "$top_source_dir/$script"
echo "OK: $script"
done
|