6 export BUP_DIR="$TOP/buptest.tmp"
13 # Very simple metadata tests -- "make install" to a temp directory,
14 # then check that bup meta can reproduce the metadata correctly
15 # (according to coreutils stat) via create, extract, start-extract,
16 # and finish-extract. The current tests are crude, and this does not
17 # test devices, varying users/groups, acls, attrs, etc.
23 export PATH="${TOP}:${PATH}" # pick up bup
24 find . | sort | xargs bup xstat --exclude-fields ctime
28 # Create a test tree and collect its info via stat(1).
31 rm -rf "${TOP}/bupmeta.tmp"
32 mkdir -p "${TOP}/bupmeta.tmp"
33 make DESTDIR="${TOP}/bupmeta.tmp/src" install
34 mkdir "${TOP}/bupmeta.tmp/src/misc"
35 cp -a cmd/bup-* "${TOP}/bupmeta.tmp/src/misc/"
36 cd "${TOP}/bupmeta.tmp/src"
37 WVPASS genstat >../src-stat
40 # Use the test tree to check bup meta.
42 WVPASS cd "${TOP}/bupmeta.tmp"
43 WVPASS bup meta --create --recurse --file src.meta src
44 WVPASS mkdir src-restore
46 WVPASS bup meta --extract --file ../src.meta
48 (cd src && genstat >../../src-restore-stat) || WVFAIL
49 WVPASS diff -u5 ../src-stat ../src-restore-stat
51 WVPASS bup meta --start-extract --file ../src.meta
53 WVPASS bup meta --finish-extract --file ../src.meta
54 (cd src && genstat >../../src-restore-stat) || WVFAIL
55 WVPASS diff -u5 ../src-stat ../src-restore-stat