diff options
author | Jim Meyering <meyering@redhat.com> | 2007-10-09 17:12:45 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2007-10-09 17:13:09 +0200 |
commit | b69049da7b0083b84c51cf8d2c9f1ee11403672f (patch) | |
tree | 83834bb5c04e99467f6953415d47c2bc1340423b | |
parent | 3e53920470cf343c8c1db9a944af5ed0e137c54d (diff) | |
download | coreutils-b69049da7b0083b84c51cf8d2c9f1ee11403672f.tar.xz |
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 "../..".
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/misc/Makefile.am | 1 | ||||
-rwxr-xr-x | tests/misc/help-version (renamed from tests/help-version) | 23 |
4 files changed, 18 insertions, 13 deletions
@@ -1,5 +1,11 @@ 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)". 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 |