]> arthur.barton.de Git - bup.git/commitdiff
sampledata: use a local absolute symlink, not /etc
authorRob Browning <rlb@defaultvalue.org>
Sun, 8 Mar 2015 20:37:20 +0000 (15:37 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 8 Mar 2015 20:42:38 +0000 (15:42 -0500)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/t/tindex.py
t/configure-sampledata

index 54775067a931bf1e90de4626ebe2e834b7d32e12..a29fa3ad7286cdf6c93e1a03f97825a8617fdc8f 100644 (file)
@@ -14,10 +14,12 @@ def index_basic():
     cd = os.path.realpath('../../../t')
     WVPASS(cd)
     sd = os.path.realpath(cd + '/sampledata')
-    WVPASSEQ(index.realpath(cd + '/sampledata'), cd + '/sampledata')
+    WVPASSEQ(index.realpath(cd + '/sampledata'), sd)
     WVPASSEQ(os.path.realpath(cd + '/sampledata/x'), sd + '/x')
-    WVPASSEQ(os.path.realpath(cd + '/sampledata/etc'), os.path.realpath('/etc'))
-    WVPASSEQ(index.realpath(cd + '/sampledata/etc'), sd + '/etc')
+    WVPASSEQ(os.path.realpath(cd + '/sampledata/abs-symlink'),
+             sd + '/abs-symlink-target')
+    WVPASSEQ(index.realpath(cd + '/sampledata/abs-symlink'),
+             sd + '/abs-symlink')
 
 
 @wvtest
index 79bf8a44f49411ef032c4503c07390b41b8ce787..1b61ddc74126e60ff72ef1ea1abfae9b9cc87937 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/env bash
 
+set -o pipefail
+
 top=$(pwd)
 
 usage()
@@ -17,7 +19,7 @@ case "$1" in
             cd t/sampledata || exit $?
             ln -sf a b || exit $?
             ln -sf b c || exit $?
-            ln -sf /etc . || exit $?
+            ln -sf "$(pwd)/abs-symlink-target" abs-symlink || exit $?
         ) || exit $?
         ;;
     '--clean')