]> arthur.barton.de Git - bup.git/blobdiff - t/test.sh
Don't pass --tmpdir to mktemp or expect it to have a default template.
[bup.git] / t / test.sh
index 8d0ffac9fd6d05bb0b7b320708d6f7770b36f23e..e932ad7bd0890ef81e1ce63e7105141adafb1823 100755 (executable)
--- a/t/test.sh
+++ b/t/test.sh
@@ -392,6 +392,8 @@ WVPASS bup random 128k >$D/b
 mkdir $D/d $D/d/e
 WVPASS bup random 512 >$D/f
 WVPASS bup index -ux $D
+WVFAIL bup save --graft =/grafted -n graft-point-absolute $D
+WVFAIL bup save --graft $TOP/$D= -n graft-point-absolute $D
 bup save --graft $TOP/$D=/grafted -n graft-point-absolute $D
 WVPASSEQ "$(bup ls graft-point-absolute/latest/grafted/)" "a
 b
@@ -471,7 +473,7 @@ WVPASS bup save -n compression -0 --strip $TOP/Documentation
 # is harmless there.)
 WVPASSEQ "$(bup ls compression/latest/ | sort)" \
         "$(ls $TOP/Documentation | grep -v '^\.' | sort)"
-COMPRESSION_0_SIZE=$(du -s $D | cut -f1)
+COMPRESSION_0_SIZE=$(du -k -s $D | cut -f1)
 
 D=compression9.tmp
 export BUP_DIR="$TOP/$D/.bup"
@@ -481,7 +483,7 @@ WVPASS bup init
 WVPASS bup index $TOP/Documentation
 WVPASS bup save -n compression -9 --strip $TOP/Documentation
 WVPASSEQ "$(bup ls compression/latest/ | sort)" "$(ls $TOP/Documentation | sort)"
-COMPRESSION_9_SIZE=$(du -s $D | cut -f1)
+COMPRESSION_9_SIZE=$(du -k -s $D | cut -f1)
 
 WVPASS [ "$COMPRESSION_9_SIZE" -lt "$COMPRESSION_0_SIZE" ]
 
@@ -498,7 +500,7 @@ WVSTART "save disjoint top-level directories"
     rm -rf $D
     mkdir -p $D/x
     date > $D/x/1
-    tmpdir="$(mktemp --tmpdir=/tmp -d bup-test-XXXXXXX)"
+    tmpdir="$(mktemp -d /tmp/bup-test-XXXXXXX)"
     cleanup() { set -x; rm -rf "${tmpdir}"; set +x; }
     trap cleanup EXIT
     date > "$tmpdir/2"
@@ -509,7 +511,6 @@ WVSTART "save disjoint top-level directories"
     WVPASS bup init
     WVPASS bup index -vu $(pwd)/$D/x "$tmpdir"
     WVPASS bup save -t -n src $(pwd)/$D/x "$tmpdir"
-    WVPASSEQ "$(bup ls -a src/latest)" \
-"$top_dir/
-tmp/"
+    # For now, assume that "ls -a" and "sort" use the same order.
+    WVPASSEQ "$(bup ls -a src/latest)" "$(echo -e "$top_dir/\ntmp/" | sort)"
 ) || WVFAIL