]> arthur.barton.de Git - bup.git/commitdiff
Move ext/test.sh to ext/test-misc to match test-* pattern
authorRob Browning <rlb@defaultvalue.org>
Sun, 15 Nov 2020 18:54:50 +0000 (12:54 -0600)
committerRob Browning <rlb@defaultvalue.org>
Thu, 26 Nov 2020 21:53:09 +0000 (15:53 -0600)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Makefile
README.md
test/ext/test-misc [new file with mode: 0755]
test/ext/test.sh [deleted file]

index 722b7f720fad39d79deeb57bc1cad5ace09bd2d1..127df500b54e1a01c926b5141a7264d659e0d18c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -165,7 +165,6 @@ runtests-python: all test/tmp
        ./pytest
 
 cmdline_tests := \
-  test/ext/test.sh \
   test/ext/test-cat-file.sh \
   test/ext/test-command-without-init-fails.sh \
   test/ext/test-compression.sh \
@@ -185,6 +184,7 @@ cmdline_tests := \
   test/ext/test-ls-remote \
   test/ext/test-main.sh \
   test/ext/test-meta.sh \
+  test/ext/test-misc \
   test/ext/test-on.sh \
   test/ext/test-packsizelimit \
   test/ext/test-redundant-saves.sh \
index 07ad1ec3258484e1c71f27107159638825ad7803..cc2f2ef962a343a857992d7f495fcc6e5f18586a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -462,11 +462,11 @@ Notes on Cygwin
  - There is no support for ACLs.  If/when some enterprising person
    fixes this, adjust dev/compare-trees.
 
- - In test/ext/test.sh, two tests have been disabled.  These tests check to
-   see that repeated saves produce identical trees and that an
-   intervening index doesn't change the SHA1.  Apparently Cygwin has
-   some unusual behaviors with respect to access times (that probably
-   warrant further investigation).  Possibly related:
+ - In test/ext/test-misc, two tests have been disabled.  These tests
+   check to see that repeated saves produce identical trees and that
+   an intervening index doesn't change the SHA1.  Apparently Cygwin
+   has some unusual behaviors with respect to access times (that
+   probably warrant further investigation).  Possibly related:
    http://cygwin.com/ml/cygwin/2007-06/msg00436.html
 
 
diff --git a/test/ext/test-misc b/test/ext/test-misc
new file mode 100755 (executable)
index 0000000..5fb96be
--- /dev/null
@@ -0,0 +1,132 @@
+#!/usr/bin/env bash
+. wvtest.sh
+. wvtest-bup.sh
+. dev/lib.sh
+
+set -o pipefail
+
+top="$(WVPASS pwd)" || exit $?
+tmpdir="$(WVPASS wvmktempdir)" || exit $?
+export BUP_DIR="$tmpdir/bup"
+
+bup() { "$top/bup" "$@"; }
+
+WVPASS cd "$tmpdir"
+
+WVSTART "init"
+WVPASS bup init
+D=bupdata.tmp
+WVPASS force-delete $D
+WVPASS mkdir $D
+WVPASS touch $D/a
+WVPASS bup random 128k >$D/b
+WVPASS mkdir $D/d $D/d/e
+WVPASS bup random 512 >$D/f
+WVPASS touch $D/d/z
+WVPASS touch $D/d/z
+WVPASS bup index $D
+WVPASS bup save -t $D
+
+
+WVSTART "bloom"
+WVPASS bup bloom -c $(ls -1 "$BUP_DIR"/objects/pack/*.idx|head -n1)
+WVPASS rm "$BUP_DIR"/objects/pack/bup.bloom
+WVPASS bup bloom -k 4
+WVPASS bup bloom -c $(ls -1 "$BUP_DIR"/objects/pack/*.idx|head -n1)
+WVPASS bup bloom -d "$BUP_DIR"/objects/pack --ruin --force
+WVFAIL bup bloom -c $(ls -1 "$BUP_DIR"/objects/pack/*.idx|head -n1)
+WVPASS bup bloom --force -k 5
+WVPASS bup bloom -c $(ls -1 "$BUP_DIR"/objects/pack/*.idx|head -n1)
+
+
+WVSTART "memtest"
+WVPASS bup memtest -c1 -n100
+WVPASS bup memtest -c1 -n100 --existing
+
+
+WVSTART "save/git-fsck"
+(
+    WVPASS cd "$BUP_DIR"
+    #git repack -Ad
+    #git prune
+    WVPASS bup random 4k | WVPASS bup split -b
+    (WVPASS cd "$top/test/sampledata" && WVPASS bup save -vvn master /) || exit $?
+    result="$(LC_ALL=C git fsck --full --strict 2>&1)" || exit $?
+    n=$(echo "$result" |
+        WVFAIL egrep -v 'dangling (commit|tree|blob)' |
+        WVPASS tee -a /dev/stderr |
+        WVPASS wc -l) || exit $?
+    WVPASS [ "$n" -eq 0 ]
+) || exit $?
+
+
+WVSTART "ftp"
+WVPASS bup ftp "cat /master/latest/$tmpdir/$D/b" >$D/b.new
+WVPASS bup ftp "cat /master/latest/$tmpdir/$D/f" >$D/f.new
+WVPASS bup ftp "cat /master/latest/$tmpdir/$D/f"{,} >$D/f2.new
+WVPASS bup ftp "cat /master/latest/$tmpdir/$D/a" >$D/a.new
+WVPASSEQ "$(sha1sum <$D/b)" "$(sha1sum <$D/b.new)"
+WVPASSEQ "$(sha1sum <$D/f)" "$(sha1sum <$D/f.new)"
+WVPASSEQ "$(cat $D/f.new{,} | sha1sum)" "$(sha1sum <$D/f2.new)"
+WVPASSEQ "$(sha1sum <$D/a)" "$(sha1sum <$D/a.new)"
+
+
+WVSTART "tag"
+WVFAIL bup tag -d v0.n 2>/dev/null
+WVFAIL bup tag v0.n non-existant 2>/dev/null
+WVPASSEQ "$(bup tag)" ""
+WVPASS bup tag v0.1 master
+WVPASSEQ "$(bup tag)" "v0.1"
+WVFAIL bup tag v0.1 master
+WVPASS bup tag -f v0.1 master
+WVPASS bup tag -d v0.1
+WVPASS bup tag -f -d v0.1
+WVFAIL bup tag -d v0.1
+
+
+WVSTART "indexfile"
+D=indexfile.tmp
+INDEXFILE=tmpindexfile.tmp
+WVPASS rm -f $INDEXFILE
+WVPASS force-delete $D
+WVPASS mkdir $D
+export BUP_DIR="$D/.bup"
+WVPASS bup init
+WVPASS touch $D/a
+WVPASS touch $D/b
+WVPASS mkdir $D/c
+WVPASS bup index -ux $D
+WVPASS bup save --strip -n bupdir $D
+WVPASSEQ "$(bup ls -F bupdir/latest/)" "a
+b
+c/"
+WVPASS bup index -f $INDEXFILE --exclude=$D/c -ux $D
+WVPASS bup save --strip -n indexfile -f $INDEXFILE $D
+WVPASSEQ "$(bup ls indexfile/latest/)" "a
+b"
+
+
+WVSTART "import-rsnapshot"
+D=rsnapshot.tmp
+export BUP_DIR="$tmpdir/$D/.bup"
+WVPASS force-delete $D
+WVPASS mkdir $D
+WVPASS bup init
+WVPASS mkdir -p $D/hourly.0/buptest/a
+WVPASS touch $D/hourly.0/buptest/a/b
+WVPASS mkdir -p $D/hourly.0/buptest/c/d
+WVPASS touch $D/hourly.0/buptest/c/d/e
+WVPASS true
+WVPASS bup import-rsnapshot $D/
+WVPASSEQ "$(bup ls -F buptest/latest/)" "a/
+c/"
+
+
+WVSTART features
+expect_py_ver=$(LC_CTYPE=C "$top/config/bin/python" \
+                        -c 'import platform; print(platform.python_version())') \
+    || exit $?
+actual_py_ver=$(bup features | grep Python: | sed -Ee 's/ +Python: //') || exit $?
+WVPASSEQ "$expect_py_ver" "$actual_py_ver"
+
+WVPASS rm -rf "$tmpdir"
diff --git a/test/ext/test.sh b/test/ext/test.sh
deleted file mode 100755 (executable)
index 5fb96be..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/usr/bin/env bash
-. wvtest.sh
-. wvtest-bup.sh
-. dev/lib.sh
-
-set -o pipefail
-
-top="$(WVPASS pwd)" || exit $?
-tmpdir="$(WVPASS wvmktempdir)" || exit $?
-export BUP_DIR="$tmpdir/bup"
-
-bup() { "$top/bup" "$@"; }
-
-WVPASS cd "$tmpdir"
-
-WVSTART "init"
-WVPASS bup init
-D=bupdata.tmp
-WVPASS force-delete $D
-WVPASS mkdir $D
-WVPASS touch $D/a
-WVPASS bup random 128k >$D/b
-WVPASS mkdir $D/d $D/d/e
-WVPASS bup random 512 >$D/f
-WVPASS touch $D/d/z
-WVPASS touch $D/d/z
-WVPASS bup index $D
-WVPASS bup save -t $D
-
-
-WVSTART "bloom"
-WVPASS bup bloom -c $(ls -1 "$BUP_DIR"/objects/pack/*.idx|head -n1)
-WVPASS rm "$BUP_DIR"/objects/pack/bup.bloom
-WVPASS bup bloom -k 4
-WVPASS bup bloom -c $(ls -1 "$BUP_DIR"/objects/pack/*.idx|head -n1)
-WVPASS bup bloom -d "$BUP_DIR"/objects/pack --ruin --force
-WVFAIL bup bloom -c $(ls -1 "$BUP_DIR"/objects/pack/*.idx|head -n1)
-WVPASS bup bloom --force -k 5
-WVPASS bup bloom -c $(ls -1 "$BUP_DIR"/objects/pack/*.idx|head -n1)
-
-
-WVSTART "memtest"
-WVPASS bup memtest -c1 -n100
-WVPASS bup memtest -c1 -n100 --existing
-
-
-WVSTART "save/git-fsck"
-(
-    WVPASS cd "$BUP_DIR"
-    #git repack -Ad
-    #git prune
-    WVPASS bup random 4k | WVPASS bup split -b
-    (WVPASS cd "$top/test/sampledata" && WVPASS bup save -vvn master /) || exit $?
-    result="$(LC_ALL=C git fsck --full --strict 2>&1)" || exit $?
-    n=$(echo "$result" |
-        WVFAIL egrep -v 'dangling (commit|tree|blob)' |
-        WVPASS tee -a /dev/stderr |
-        WVPASS wc -l) || exit $?
-    WVPASS [ "$n" -eq 0 ]
-) || exit $?
-
-
-WVSTART "ftp"
-WVPASS bup ftp "cat /master/latest/$tmpdir/$D/b" >$D/b.new
-WVPASS bup ftp "cat /master/latest/$tmpdir/$D/f" >$D/f.new
-WVPASS bup ftp "cat /master/latest/$tmpdir/$D/f"{,} >$D/f2.new
-WVPASS bup ftp "cat /master/latest/$tmpdir/$D/a" >$D/a.new
-WVPASSEQ "$(sha1sum <$D/b)" "$(sha1sum <$D/b.new)"
-WVPASSEQ "$(sha1sum <$D/f)" "$(sha1sum <$D/f.new)"
-WVPASSEQ "$(cat $D/f.new{,} | sha1sum)" "$(sha1sum <$D/f2.new)"
-WVPASSEQ "$(sha1sum <$D/a)" "$(sha1sum <$D/a.new)"
-
-
-WVSTART "tag"
-WVFAIL bup tag -d v0.n 2>/dev/null
-WVFAIL bup tag v0.n non-existant 2>/dev/null
-WVPASSEQ "$(bup tag)" ""
-WVPASS bup tag v0.1 master
-WVPASSEQ "$(bup tag)" "v0.1"
-WVFAIL bup tag v0.1 master
-WVPASS bup tag -f v0.1 master
-WVPASS bup tag -d v0.1
-WVPASS bup tag -f -d v0.1
-WVFAIL bup tag -d v0.1
-
-
-WVSTART "indexfile"
-D=indexfile.tmp
-INDEXFILE=tmpindexfile.tmp
-WVPASS rm -f $INDEXFILE
-WVPASS force-delete $D
-WVPASS mkdir $D
-export BUP_DIR="$D/.bup"
-WVPASS bup init
-WVPASS touch $D/a
-WVPASS touch $D/b
-WVPASS mkdir $D/c
-WVPASS bup index -ux $D
-WVPASS bup save --strip -n bupdir $D
-WVPASSEQ "$(bup ls -F bupdir/latest/)" "a
-b
-c/"
-WVPASS bup index -f $INDEXFILE --exclude=$D/c -ux $D
-WVPASS bup save --strip -n indexfile -f $INDEXFILE $D
-WVPASSEQ "$(bup ls indexfile/latest/)" "a
-b"
-
-
-WVSTART "import-rsnapshot"
-D=rsnapshot.tmp
-export BUP_DIR="$tmpdir/$D/.bup"
-WVPASS force-delete $D
-WVPASS mkdir $D
-WVPASS bup init
-WVPASS mkdir -p $D/hourly.0/buptest/a
-WVPASS touch $D/hourly.0/buptest/a/b
-WVPASS mkdir -p $D/hourly.0/buptest/c/d
-WVPASS touch $D/hourly.0/buptest/c/d/e
-WVPASS true
-WVPASS bup import-rsnapshot $D/
-WVPASSEQ "$(bup ls -F buptest/latest/)" "a/
-c/"
-
-
-WVSTART features
-expect_py_ver=$(LC_CTYPE=C "$top/config/bin/python" \
-                        -c 'import platform; print(platform.python_version())') \
-    || exit $?
-actual_py_ver=$(bup features | grep Python: | sed -Ee 's/ +Python: //') || exit $?
-WVPASSEQ "$expect_py_ver" "$actual_py_ver"
-
-WVPASS rm -rf "$tmpdir"