From 762dff06850ff15cc400a653d0e9778af9998139 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 8 Mar 2015 15:37:20 -0500 Subject: [PATCH] sampledata: use a local absolute symlink, not /etc Signed-off-by: Rob Browning Tested-by: Rob Browning --- lib/bup/t/tindex.py | 8 +++++--- t/configure-sampledata | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/bup/t/tindex.py b/lib/bup/t/tindex.py index 5477506..a29fa3a 100644 --- a/lib/bup/t/tindex.py +++ b/lib/bup/t/tindex.py @@ -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 diff --git a/t/configure-sampledata b/t/configure-sampledata index 79bf8a4..1b61ddc 100755 --- a/t/configure-sampledata +++ b/t/configure-sampledata @@ -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') -- 2.39.2