summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/misc/Makefile.am1
-rwxr-xr-xtests/misc/help-version (renamed from tests/help-version)23
3 files changed, 12 insertions, 13 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 25b77fce0..fa2ff29be 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -7,7 +7,6 @@ ASSORT = LC_ALL=C sort
built_programs = (cd ../src && MAKEFLAGS= $(MAKE) -s built_programs.list)
-TESTS = help-version
TESTS_ENVIRONMENT = \
built_programs="`$(built_programs)`" \
PACKAGE_BUGREPORT=$(PACKAGE_BUGREPORT) \
diff --git a/tests/misc/Makefile.am b/tests/misc/Makefile.am
index 04f1315fe..7f5de4467 100644
--- a/tests/misc/Makefile.am
+++ b/tests/misc/Makefile.am
@@ -74,6 +74,7 @@ TESTS = \
groups-version \
head-c \
head-pos \
+ help-version \
md5sum \
md5sum-newline \
mknod \
diff --git a/tests/help-version b/tests/misc/help-version
index 00b879c21..d2eb04db5 100755
--- a/tests/help-version
+++ b/tests/misc/help-version
@@ -25,7 +25,8 @@ test "$VERBOSE" = yes && set -x
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
@@ -74,8 +75,10 @@ for lang in C fr da; do
# 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
@@ -83,8 +86,8 @@ for lang in C fr da; do
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
@@ -92,8 +95,8 @@ for lang in C fr da; do
# 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"
@@ -205,7 +208,7 @@ for i in $built_programs; do
# 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
@@ -214,8 +217,4 @@ for i in $built_programs; do
rm -rf $tmp_in $tmp_in2 $tmp_out $tmp_dir
done
-# FIXME: trap
-cd ..
-rm -rf $tmp
-
exit $fail