2007-10-09 Jim Meyering <meyering@redhat.com>
+ Move the help-version test into misc/.
+ * tests/help-version: Move to...
+ * tests/misc/help-version: ...here.
+ Source test-lib.sh, as usual.
+ Use $abs_top_builddir, rather than ".." and "../..".
+
Make the runcon-no-reorder test slightly more general.
* tests/misc/runcon-no-reorder: Don't hard-code "unconstrained_t".
Use slightly more general "runcon $(id -Z)".
test "x$SHELL" = x && SHELL=/bin/sh
export SHELL
-. $srcdir/envvar-check
+. $srcdir/../envvar-check
+. $srcdir/../test-lib.sh
expected_failure_status_nohup=127
expected_failure_status_printenv=2
# false fails even when invoked with --help or --version.
if test $i = false; then
- env LC_MESSAGES=$lang ../src/$i --help >/dev/null && fail=1
- env LC_MESSAGES=$lang ../src/$i --version >/dev/null && fail=1
+ env LC_MESSAGES=$lang $abs_top_builddir/src/$i --help \
+ >/dev/null && fail=1
+ env LC_MESSAGES=$lang $abs_top_builddir/src/$i --version \
+ >/dev/null && fail=1
continue
fi
test $i = install && i=ginstall
# Make sure they exit successfully, under normal conditions.
- ../src/$i --help > h-$i || fail=1
- ../src/$i --version >/dev/null || fail=1
+ $abs_top_builddir/src/$i --help > h-$i || fail=1
+ $abs_top_builddir/src/$i --version >/dev/null || fail=1
# Make sure they mention the bug-reporting address in --help output.
grep "$PACKAGE_BUGREPORT" h-$i > /dev/null || fail=1
# Make sure they fail upon `disk full' error.
if test -w /dev/full && test -c /dev/full; then
- ../src/$i --help >/dev/full 2>/dev/null && fail=1
- ../src/$i --version >/dev/full 2>/dev/null && fail=1
+ $abs_top_builddir/src/$i --help >/dev/full 2>/dev/null && fail=1
+ $abs_top_builddir/src/$i --version >/dev/full 2>/dev/null && fail=1
status=$?
test $i = [ && prog=lbracket || prog=$i
eval "expected=\$expected_failure_status_$prog"
# echo ================== $i
test $i = [ && prog=lbracket || prog=$i
eval "args=\$${prog}_args"
- if ../../src/$i $args < $tmp_in > $tmp_out; then
+ if $abs_top_builddir/src/$i $args < $tmp_in > $tmp_out; then
: # ok
else
echo FAIL: $i
rm -rf $tmp_in $tmp_in2 $tmp_out $tmp_dir
done
-# FIXME: trap
-cd ..
-rm -rf $tmp
-
exit $fail