Add a dev/sort-z wrapper to handle sorting null terminated lines
across platforms. Apparently NetBSD supports "-R 000" instead of -z.
Add a t/bin for any commands we want to make available to all tests,
symlink sort-z there, and add it to the PATH in test-meta.sh.
Thanks to Greg Troxel for reporting the problem.
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
--- /dev/null
+#!/bin/sh
+
+set -e
+
+if test "$(uname -s)" = NetBSD; then
+ exec sort -R 000 "$@"
+fi
+
+exec sort -z "$@"
--- /dev/null
+../../dev/sort-z
\ No newline at end of file
root_status="$(t/root-status)" || exit $?
TOP="$(WVPASS pwd)" || exit $?
root_status="$(t/root-status)" || exit $?
TOP="$(WVPASS pwd)" || exit $?
+export PATH="$TOP/t/bin:$PATH"
tmpdir="$(WVPASS wvmktempdir)" || exit $?
export BUP_DIR="$tmpdir/bup"
tmpdir="$(WVPASS wvmktempdir)" || exit $?
export BUP_DIR="$tmpdir/bup"
export PATH="$TOP/bin:$PATH" # pick up bup
bup version
# Skip atime (test elsewhere) to avoid the observer effect.
export PATH="$TOP/bin:$PATH" # pick up bup
bup version
# Skip atime (test elsewhere) to avoid the observer effect.
- WVPASS find . -print0 | WVPASS sort -z \
+ WVPASS find . -print0 | WVPASS sort-z \
| WVPASS xargs -0 bup xstat \
--mtime-resolution "$mtime_resolution"ns \
--exclude-fields ctime,atime,size
| WVPASS xargs -0 bup xstat \
--mtime-resolution "$mtime_resolution"ns \
--exclude-fields ctime,atime,size