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 feb4fc0..5cb8b78 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 e756b5b..461b6fa 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 5b3913a..3394265 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 72fb05a..2aee87e 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 5e01013..6df1d43 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 858c2af..536391a 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 3335d07..3c41ecb 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 6afaead..fd586ae 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 32801a3..ffc97c3 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 1ecdb20..127a826 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 d883f5b..ff4869f 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 e5396c2..fdbab1d 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 fed5bcf..8f83fcf 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 30913ec..009c6d4 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 0b7e213..68c46f9 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 ca32e47..a8ca44c 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 d0e90c1..38f3836 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 b265a3e..12f1447 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 b5fe2e0..f5a32a8 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 eb8482d..0030f34 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 e6ef5b6..a9ec3a4 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