X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=t%2Ftest-restore-map-owner.sh;h=bf9362e46dc39614e900ddf6df68875649d25d73;hb=bf67f94dd4f4096de4eee07a7dc377d6c889a016;hp=e5eeee3756862f90deee5601a0dc6ca0450a2d57;hpb=c7139a3fae51633f0f290ebf73f0cf5e4864e547;p=bup.git diff --git a/t/test-restore-map-owner.sh b/t/test-restore-map-owner.sh index e5eeee3..bf9362e 100755 --- a/t/test-restore-map-owner.sh +++ b/t/test-restore-map-owner.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash . ./wvtest-bup.sh || exit $? +. t/lib.sh || exit $? -if [ $(t/root-status) != root ]; then +root_status="$(t/root-status)" || exit $? + +if [ "$root_status" != root ]; then echo 'Not root: skipping restore --map-* tests.' exit 0 # FIXME: add WVSKIP. fi @@ -79,7 +82,7 @@ WVPASS grep -qE "^uid: $other_uid\$" foo-xstat WVPASS grep -qE "^group: $other_group\$" foo-xstat WVPASS grep -qE "^gid: $other_gid\$" foo-xstat -has_uid_gid_0=$(WVPASS python -c " +has_uid_gid_0=$(WVPASS bup-python -c " import grp, pwd try: pwd.getpwuid(0)