]> arthur.barton.de Git - bup.git/blobdiff - t/test-restore-map-owner.sh
get: adjust for python 3 and test there
[bup.git] / t / test-restore-map-owner.sh
index e5eeee3756862f90deee5601a0dc6ca0450a2d57..bf9362e46dc39614e900ddf6df68875649d25d73 100755 (executable)
@@ -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)