X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=t%2Ftest-ls.sh;h=4a1b2106df046479fd60a27f4ba6baf3ea9e7a61;hb=6bfd8db535475a7e4a30b6c62161359fd0dc5e56;hp=0b8fbcf839d741ee6d4c69342200c6e61bdf8aa1;hpb=66b5d05cc3a7d8ea396e7150cf5ecfcf99598c0b;p=bup.git diff --git a/t/test-ls.sh b/t/test-ls.sh index 0b8fbcf..4a1b210 100755 --- a/t/test-ls.sh +++ b/t/test-ls.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash . ./wvtest-bup.sh || exit $? +. t/lib.sh || exit $? set -o pipefail @@ -60,8 +61,7 @@ WVPASSEQ "$(WVPASS bup ls /.tag)" "some-tag" WVPASSEQ "$(WVPASS bup ls /src)" \ "1977-09-05-125600 -latest -some-tag" +latest" WVPASSEQ "$(WVPASS bup ls src/latest/"$tmpdir"/src)" "executable fifo @@ -138,7 +138,7 @@ symlink_date="$(WVPASS echo "$symlink_bup_info" \ || exit $? if test "$(uname -s)" != NetBSD; then - symlink_size="$(WVPASS python -c "import os + symlink_size="$(WVPASS bup-python -c "import os print os.lstat('src/symlink').st_size")" || exit $? else # NetBSD appears to return varying sizes, so for now, just ignore it. @@ -148,9 +148,9 @@ else fi uid="$(id -u)" || exit $? -gid="$(python -c 'import os; print os.stat("src").st_gid')" || exit $? +gid="$(bup-python -c 'import os; print os.stat("src").st_gid')" || exit $? user="$(id -un)" || exit $? -group="$(python -c 'import grp, os; +group="$(bup-python -c 'import grp, os; print grp.getgrgid(os.stat("src").st_gid)[0]')" || exit $? WVPASSEQ "$(bup ls -l src/latest"$tmpdir"/src | tr -s ' ' ' ')" \ @@ -206,7 +206,6 @@ WVPASSEQ "$(bup ls -ld "src/latest$tmpdir/src" | tr -s ' ' ' ')" \ WVSTART "ls (backup set - long)" WVPASSEQ "$(bup ls -l src | cut -d' ' -f 1-2)" \ "l--------- ?/? -l--------- ?/? l--------- ?/?"