prefer abs_srcdir over abs_top_srcdir, ...
authorJim Meyering <meyering@redhat.com>
Tue, 27 May 2008 11:24:20 +0000 (13:24 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 27 May 2008 11:30:44 +0000 (13:30 +0200)
so that e.g., tests/* may refer to absolute names without
hard-coding the name of the containing directory (tests/, here).
* tests/check.mk (TESTS_ENVIRONMENT): Define abs_srcdir.
* tests/pr/pr-tests: Use $abs_srcdir/pr not $abs_top_srcdir/tests/pr.
* tests/chmod/c-option: Use $abs_srcdir, not $abs_top_srcdir/tests.
* tests/cp/cp-parents: Likewise.
* tests/mkdir/parents: Likewise.
* tests/mkdir/perm: Likewise.
* tests/mv/acl: Likewise.
* tests/mv/backup-is-src: Likewise.
* tests/mv/hard-link-1: Likewise.
* tests/mv/into-self-2: Likewise.
* tests/mv/leak-fd: Likewise.
* tests/mv/mv-special-1: Likewise.
* tests/mv/part-fail: Likewise.
* tests/mv/part-hardlink: Likewise.
* tests/mv/part-rename: Likewise.
* tests/mv/part-symlink: Likewise.
* tests/mv/partition-perm: Likewise.
* tests/mv/sticky-to-xpart: Likewise.
* tests/mv/to-symlink: Likewise.
* tests/rm/one-file-system: Likewise.
* tests/sample-test: Likewise.

21 files changed:
tests/check.mk
tests/chmod/c-option
tests/cp/cp-parents
tests/mkdir/parents
tests/mkdir/perm
tests/mv/acl
tests/mv/backup-is-src
tests/mv/hard-link-1
tests/mv/into-self-2
tests/mv/leak-fd
tests/mv/mv-special-1
tests/mv/part-fail
tests/mv/part-hardlink
tests/mv/part-rename
tests/mv/part-symlink
tests/mv/partition-perm
tests/mv/sticky-to-xpart
tests/mv/to-symlink
tests/pr/pr-tests
tests/rm/one-file-system
tests/sample-test

index feb4fc040017f29fa7ce7f663c04d8799e586cdd..5cb8b781ea576bf17885a1806a94e4f13e0099ec 100644 (file)
@@ -70,6 +70,7 @@ TESTS_ENVIRONMENT =                           \
   LOCALE_FR='$(LOCALE_FR)'                     \
   abs_top_builddir='$(abs_top_builddir)'       \
   abs_top_srcdir='$(abs_top_srcdir)'           \
+  abs_srcdir='$(abs_srcdir)'                   \
   built_programs="`$(built_programs)`"         \
   host_os=$(host_os)                           \
   host_triplet='$(host_triplet)'               \
index e756b5be8f59d9fa30a185d386a1a299916b3d14..461b6faa25106dc95ffb1d88817586af0efbd7bb 100755 (executable)
@@ -28,7 +28,7 @@ file=f
 touch $file || framework_failure
 chmod 444 $file || framework_failure
 
-. "$abs_top_srcdir/tests/setgid-check"
+. "$abs_srcdir/setgid-check"
 
 fail=0
 
index 5b3913a7fd1642d3a2de591b17d7c1373816c2dd..3394265bb9a95580cb8117413a5ea1059a5892c6 100755 (executable)
@@ -28,7 +28,7 @@ fi
 working_umask_or_skip_
 
 # Run the setgid check from the just-created directory.
-. "$abs_top_srcdir/tests/setgid-check"
+. "$abs_srcdir/setgid-check"
 
 mkdir foo bar || framework_failure
 mkdir -p a/b/c d e g || framework_failure
index 72fb05a4bb5b9cefdb4570a3acdd06cfb1e17ef3..2aee87e6f73e61002083818077da40c4155edb54 100755 (executable)
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
 fi
 
 . $top_srcdir/tests/test-lib.sh
-. "$abs_top_srcdir/tests/setgid-check"
+. "$abs_srcdir/setgid-check"
 
 mkdir -m 700 e-dir || framework_failure
 
index 5e010139d3d8312431186d0009c489420394b5ee..6df1d4339c1807327838c07269e43bc6b4c0be4d 100755 (executable)
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
 fi
 
 . $top_srcdir/tests/test-lib.sh
-. "$abs_top_srcdir/tests/setgid-check"
+. "$abs_srcdir/setgid-check"
 
 working_umask_or_skip_
 
index 858c2aff923eb586385b7abf470c46adc86b086e..536391a68e46148ebf0e0ea8883028212911dbdf 100755 (executable)
@@ -32,7 +32,7 @@ grep '^#define USE_ACL 0' $CONFIG_HEADER > /dev/null &&
   skip_test_ "insufficient ACL support"
 
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 touch file || framework_failure
 t1=$other_partition_tmpdir/t1
index 3335d07586eedbc243b84505f72f835d3e210bea..3c41ecba874f751b9f14e74a65b5805ca0389e9d 100755 (executable)
@@ -23,7 +23,7 @@ fi
 
 . $top_srcdir/tests/test-lib.sh
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 a="$other_partition_tmpdir/a"
 a2="$other_partition_tmpdir/a~"
index 6afaeade6b2685a3808c71fd749ed66d9900a055..fd586aeca0a11a7353dda5c77c25545b09c05e71 100755 (executable)
@@ -24,7 +24,7 @@ fi
 
 . $top_srcdir/tests/test-lib.sh
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 dir=hlink
 
index 32801a3a4a5e22e8a5e019e53a6cb32d9ea557f1..ffc97c31626f464a58702d71e08700653b9f4928 100755 (executable)
@@ -25,7 +25,7 @@ fi
 
 . $top_srcdir/tests/test-lib.sh
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 file="$other_partition_tmpdir/file"
 symlink=symlink
index 1ecdb20c4709c13786ef8d658dc256ae2a402fba..127a826ab88bfc746a0a7f75c4fa85a126286927 100755 (executable)
@@ -26,7 +26,7 @@ fi
 . $top_srcdir/tests/test-lib.sh
 skip_if_root_
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 # This test is relatively expensive, and might well evoke a
 # framework-failure on systems with a smaller command-line length
index d883f5b123ec1e7bc0f1dcff2c213bb78bb34447..ff4869fc2a6423b1056b5426d40582751872511b 100755 (executable)
@@ -24,7 +24,7 @@ fi
 
 . $top_srcdir/tests/test-lib.sh
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 null=mv-null
 dir=mv-dir
index e5396c2c6d328e5221dcb4108fd031ee331cab89..fdbab1d7d73c613bec6052dfd899c0c3aa293ec8 100755 (executable)
@@ -27,7 +27,7 @@ fi
 . $top_srcdir/tests/test-lib.sh
 skip_if_root_
 cleanup_() { t=$other_partition_tmpdir; chmod -R 700 "$t"; rm -rf "$t"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 touch k $other_partition_tmpdir/k || framework_failure
 chmod u-w $other_partition_tmpdir || framework_failure
index fed5bcf347cb741c881f431f987aae6860420486..8f83fcf27b74b150f33caaef490b9e3b78d74efe 100755 (executable)
@@ -26,7 +26,7 @@ fi
 
 . $top_srcdir/tests/test-lib.sh
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 touch f || framework_failure
 ln f g || framework_failure
index 30913ec101d059b8987e7dfce4a0fae98f387c7c..009c6d44357c9feb677f12a7424198e50ace9511 100755 (executable)
@@ -25,7 +25,7 @@ fi
 
 . $top_srcdir/tests/test-lib.sh
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 mkdir foo || framework_failure
 
index 0b7e21347d25b96d5629d79f7237063ab79b5c44..68c46f9ea63050e8c848b37da44402a6e78e22cf 100755 (executable)
@@ -25,7 +25,7 @@ fi
 
 . $top_srcdir/tests/test-lib.sh
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 pwd_tmp=`pwd`
 
index ca32e473f7e49464e5b61e15e87393a9940ba4c5..a8ca44c8e52b74ca8a08fcc6b433ae6b4edda367 100755 (executable)
@@ -23,7 +23,7 @@ fi
 
 . $top_srcdir/tests/test-lib.sh
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 : > file
 chmod a=rwx file
index d0e90c1acb3a0c93ba7444a9ad53df7bd89089d7..38f3836927af3e0ac0a0e70dbf84adf16960ee94 100755 (executable)
@@ -28,7 +28,7 @@ fi
 require_root_
 
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 # Set up to run a test where non-root user tries to move a root-owned
 # file from a sticky tmpdir to a directory owned by that user on
index b265a3e31313d8ecd5a7f60deda9650feae23a76..12f1447d1d7d82f78ce289f4c49acdf2ba03e46b 100755 (executable)
@@ -24,7 +24,7 @@ fi
 
 . $top_srcdir/tests/test-lib.sh
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 rem_file="$other_partition_tmpdir/file"
 rem_symlink="$other_partition_tmpdir/symlink"
index b5fe2e09eadb76f43015c497ca29dede675428dc..f5a32a8f4b848acfc4fe454ba1177a7b835f835c 100755 (executable)
@@ -394,7 +394,7 @@ my @tv = (
 # Convert the above old-style test vectors to the newer
 # format used by Coreutils.pm.
 
-my $pfx = "$ENV{abs_top_srcdir}/tests/pr";
+my $pfx = "$ENV{abs_srcdir}/pr";
 
 # Normalize otherwise-variable output page headers.
 my $common_option_prefix = '--date-format="-- Date/Time --" -h x';
index eb8482de8eee977413a312f4a13fca6d642eda32..0030f3437996e64af6362f7c27abc39230643225 100755 (executable)
@@ -26,7 +26,7 @@ require_root_
 
 # If used, these must *follow* test-lib.sh.
 cleanup_() { rm -rf "$other_partition_tmpdir"; }
-. "$abs_top_srcdir/tests/other-fs-tmpdir"
+. "$abs_srcdir/other-fs-tmpdir"
 
 t=$other_partition_tmpdir
 mkdir -p a/b $t/y
index e6ef5b6fac60a1a9ef7164438df5d91e955b14ac..a9ec3a48caddabdd091c690950968f2e0f9978f5 100644 (file)
@@ -28,7 +28,7 @@ fi
 
 # If used, these must *follow* test-lib.sh.
 # FIXME: cleanup_() { rm -rf "$other_partition_tmpdir"; }
-# FIXME: . "$abs_top_srcdir/tests/other-fs-tmpdir"
+# FIXME: . "$abs_srcdir/other-fs-tmpdir"
 
 fail=0
 FIXME > out || fail=1