]> arthur.barton.de Git - bup.git/blobdiff - t/test.sh
Add (private for now) "bup xstat" command and use it in the metadata tests.
[bup.git] / t / test.sh
index 4648b9dfd0e4a2a89606201ed70c2fa4d5ddecbd..c833532104eb51c2df71f33a0921e48fe54b6a3c 100755 (executable)
--- a/t/test.sh
+++ b/t/test.sh
@@ -220,52 +220,4 @@ else
     WVFAIL bup fsck --quick -r # still fails because par2 was missing
 fi
 
-# Very simple metadata tests -- "make install" to a temp directory,
-# then check that bup meta can reproduce the metadata correctly
-# (according to coreutils stat) via create, extract, build-tree, and
-# settle-up.  The current use of stat is crude, and this does not test
-# devices, varying users/groups, acls, attrs, etc.
-WVSTART "meta"
-
-genstat()
-{
-    find . |
-      sort |
-      xargs stat |
-      sed -e 's/Inode: [0-9]\+ *//' \
-         -e '/^ \+Size: /d' \
-         -e '/^Change: /d' \
-         -e '/^Access: [0-9]/d'
-}
-
-# Create a test tree and collect its info via stat(1).
-(
-  set -e
-  rm -rf "${TOP}/bupmeta.tmp"
-  mkdir -p "${TOP}/bupmeta.tmp"
-  make DESTDIR="${TOP}/bupmeta.tmp/src" install
-  mkdir "${TOP}/bupmeta.tmp/src/misc"
-  cp -a cmd/bup-* "${TOP}/bupmeta.tmp/src/misc/"
-  cd "${TOP}/bupmeta.tmp/src"
-  WVPASS genstat >../src-stat
-) || WVFAIL
-
-# Use the test tree to check bup meta.
-(
-  WVPASS cd "${TOP}/bupmeta.tmp"
-  WVPASS bup meta --create --recurse --file src.meta src
-  WVPASS mkdir src-restore
-  WVPASS cd src-restore
-  WVPASS bup meta --extract --file ../src.meta
-  WVPASS test -d src
-  (cd src && genstat >../../src-restore-stat) || WVFAIL
-  WVPASS diff -u ../src-stat ../src-restore-stat
-  WVPASS rm -rf src
-  WVPASS bup meta --start-extract --file ../src.meta
-  WVPASS test -d src
-  WVPASS bup meta --finish-extract --file ../src.meta
-  (cd src && genstat >../../src-restore-stat) || WVFAIL
-  WVPASS diff -u ../src-stat ../src-restore-stat
-)
-
 exit 0