From eabe4037eb2807de40ca0a15fee0e3b3def01f63 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 21 Jun 2020 11:29:23 -0500 Subject: [PATCH] configure-sampledata: only create random paths if asked Stop creating randomized paths in t/sampledata/ by default. I'd originally just added this to allow some quick testing, and while it now appears to be fine on Linux/ext4, it's too aggressive to be the default, so hide it behind a BUP_TEST_RANDOMIZED_SAMPLEDATA_PATHS environment variable. Among other things, make-random-paths just crashes on cirrus macos, and cirrus freebsd was having (different) trouble. It might also have been macos where test-import-duplicity.sh failed on compare-trees mismatches. Not sure whether that was an issue with bup, rsync, or duplicity. We'll want to restore broader randomized path testing, but likely via a less blunt instrument, since placing the paths in t/sampledata affects any test that relies on it, and existing testing constructs like WVPASSEQ ... $(... | wc -l) are completely incompatible. Signed-off-by: Rob Browning --- t/configure-sampledata | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/configure-sampledata b/t/configure-sampledata index 487a0f5..111c7c3 100755 --- a/t/configure-sampledata +++ b/t/configure-sampledata @@ -49,7 +49,9 @@ case "$1" in cp -pP "$top"/Documentation/*.md doc/ || exit $? cp -pP "$top"/lib/bup/*.py lib/bup || exit $? mkdir path-zoo || exit $? - "$top"/t/make-random-paths 3000 path-zoo || exit $? + if test "$BUP_TEST_RANDOMIZED_SAMPLEDATA_PATHS"; then + "$top"/t/make-random-paths 3000 path-zoo || exit $? + fi # The "v" ensures that if "configure-sampledata # --revision" and/or the setup above fails somehow, # callers like make will be looking for a file that won't -- 2.39.2