]> arthur.barton.de Git - bup.git/blobdiff - t/test-meta.sh
Add portable dev/sort-z; link into t/bin/; use in test-meta.sh
[bup.git] / t / test-meta.sh
index eb1f97b4896dae028cc003934fea42a56cbc7142..73ce11672063c54c188508b7e7afb52ffb5fbb44 100755 (executable)
@@ -7,6 +7,7 @@ set -o pipefail
 root_status="$(t/root-status)" || exit $?
 
 TOP="$(WVPASS pwd)" || exit $?
+export PATH="$TOP/t/bin:$PATH"
 tmpdir="$(WVPASS wvmktempdir)" || exit $?
 export BUP_DIR="$tmpdir/bup"
 
@@ -43,9 +44,10 @@ id-other-than()
 genstat()
 {
     (
-        export PATH="$TOP:$PATH" # pick up bup
+        export PATH="$TOP/bin:$PATH" # pick up bup
+        bup version
         # Skip atime (test elsewhere) to avoid the observer effect.
-        WVPASS find . -print0 | WVPASS sort -z \
+        WVPASS find . -print0 | WVPASS sort-z \
             | WVPASS xargs -0 bup xstat \
             --mtime-resolution "$mtime_resolution"ns \
             --exclude-fields ctime,atime,size
@@ -439,9 +441,9 @@ src/foo/3"
     tmpdir="$(WVPASS wvmktempdir)" || exit $?    
 
     # FIXME: binary groups
-    first_group="$(WVPASS bup-python -c 'import os,grp; \
+    first_group="$(WVPASS bup-cfg-py -c 'import os,grp; \
       print(grp.getgrgid(os.getgroups()[0])[0])')" || exit $?
-    last_group="$(bup-python -c 'import os,grp; \
+    last_group="$(bup-cfg-py -c 'import os,grp; \
       print(grp.getgrgid(os.getgroups()[-1])[0])')" || exit $?
     last_group_erx="$(escape-erx "$last_group")"
 
@@ -719,7 +721,7 @@ if [ "$root_status" = root ]; then
                 WVPASS cd "$testfs_limited"/src-restore
                 WVFAIL bup meta --extract --file "$testfs"/src.meta 2>&1 \
                     | WVPASS grep -e '^Linux chattr:' \
-                    | WVPASS bup-python -c \
+                    | WVPASS bup-cfg-py -c \
                     'import sys; exit(not len(sys.stdin.readlines()) == 3)'
             ) || exit $?
         ) || exit $?
@@ -743,7 +745,7 @@ if [ "$root_status" = root ]; then
             WVFAIL bup meta --extract --file "$testfs"/src.meta
             WVFAIL bup meta --extract --file "$testfs"/src.meta 2>&1 \
                 | WVPASS grep -e "^xattr\.set u\?'" \
-                | WVPASS bup-python -c \
+                | WVPASS bup-cfg-py -c \
                 'import sys; exit(not len(sys.stdin.readlines()) == 2)'
         ) || exit $?
 
@@ -765,7 +767,7 @@ if [ "$root_status" = root ]; then
             WVPASS cd "$testfs_limited"/src-restore
             WVFAIL bup meta --extract --file "$testfs"/src.meta 2>&1 \
                 | WVPASS grep -e '^POSIX1e ACL applyto:' \
-                | WVPASS bup-python -c \
+                | WVPASS bup-cfg-py -c \
                 'import sys; exit(not len(sys.stdin.readlines()) == 2)'
         ) || exit $?