]> arthur.barton.de Git - bup.git/commitdiff
"Fix" tests with differing logical/physical paths
authorRob Browning <rlb@defaultvalue.org>
Fri, 18 Dec 2015 23:52:39 +0000 (17:52 -0600)
committerRob Browning <rlb@defaultvalue.org>
Fri, 18 Dec 2015 23:57:01 +0000 (17:57 -0600)
Explicitly "cd $(pwd -P)" before testing to work around problems
relating to unresolved questions about the correct behavior of drecurse
when the logical and physical paths differ.

The problem can be reproduced by entering a bup source directory via a
symlink and running "make check":

  ln -s bup-real bup
  cd bup
  make check

Thanks to Brandon Smith and Greg Troxel for reporting the
problem (again) and proposing slightly different solutions.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Makefile

index 5ffa48037f87bbc32817ae800d8aad44a5edd140..dff3647b1462c7eddfc13b4815c19a07e211f34f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -121,8 +121,11 @@ t/tmp:
 
 runtests: runtests-python runtests-cmdline
 
+# The "pwd -P" here may not be appropriate in the long run, but we
+# need it until we settle the relevant drecurse/exclusion questions:
+# https://groups.google.com/forum/#!topic/bup-list/9ke-Mbp10Q0
 runtests-python: all t/tmp
-       $(pf); TMPDIR="$(test_tmp)" \
+       $(pf); cd $$(pwd -P); TMPDIR="$(test_tmp)" \
          $(PYTHON) wvtest.py t/t*.py lib/*/t/t*.py 2>&1 \
            | tee -a t/tmp/test-log/$$$$.log
 
@@ -155,8 +158,11 @@ cmdline_tests := \
   t/test.sh
 
 # For parallel runs.
+# The "pwd -P" here may not be appropriate in the long run, but we
+# need it until we settle the relevant drecurse/exclusion questions:
+# https://groups.google.com/forum/#!topic/bup-list/9ke-Mbp10Q0
 tmp-target-run-test%: all t/tmp
-       $(pf); TMPDIR="$(test_tmp)" \
+       $(pf); cd $$(pwd -P); TMPDIR="$(test_tmp)" \
          t/test$* 2>&1 | tee -a t/tmp/test-log/$$$$.log
 
 runtests-cmdline: $(subst t/test,tmp-target-run-test,$(cmdline_tests))