]> arthur.barton.de Git - bup.git/commitdiff
Have "make check" to do nothing for Python 3
authorRob Browning <rlb@defaultvalue.org>
Sun, 8 Sep 2019 19:39:36 +0000 (14:39 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 29 Sep 2019 20:25:18 +0000 (15:25 -0500)
In preparation for Python 3, don't run any tests for make check.
We'll enable individual tests once bup supports Python 3 well enough
for them to pass.

This shouldn't risk producing a false sense of security because you
still have to set BUP_ALLOW_UNEXPECTED_PYTHON_VERSION=true or bup
won't run at all, and if you've seen the warning produced when you
don't set it, you should be sufficiently well informed.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Makefile
config/config.vars.in
config/configure

index 38e0ee4b4f08774ce43af89158c356d74f032be1..3f0b603db6dcc86cdbebbe69a615d3af9c81bd2c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -140,7 +140,11 @@ lib/bup/_checkout.py:
 t/tmp:
        mkdir t/tmp
 
-runtests: runtests-python runtests-cmdline
+ifeq "2" "$(bup_python_majver)"
+  runtests: runtests-python runtests-cmdline
+else
+  runtests: runtests-cmdline
+endif
 
 # The "pwd -P" here may not be appropriate in the long run, but we
 # need it until we settle the relevant drecurse/exclusion questions:
@@ -150,57 +154,65 @@ runtests-python: all t/tmp
          "$(bup_python)" wvtest.py t/t*.py lib/*/t/t*.py 2>&1 \
            | tee -a t/tmp/test-log/$$$$.log
 
-cmdline_tests := \
-  t/test-ftp \
-  t/test-save-restore \
-  t/test-packsizelimit \
-  t/test-prune-older \
-  t/test-web.sh \
-  t/test-rm.sh \
-  t/test-gc.sh \
-  t/test-main.sh \
-  t/test-list-idx.sh \
-  t/test-index.sh \
-  t/test-split-join.sh \
-  t/test-fuse.sh \
-  t/test-drecurse.sh \
-  t/test-cat-file.sh \
-  t/test-compression.sh \
-  t/test-fsck.sh \
-  t/test-index-clear.sh \
-  t/test-index-check-device.sh \
-  t/test-ls \
-  t/test-ls-remote \
-  t/test-tz.sh \
-  t/test-meta.sh \
-  t/test-on.sh \
-  t/test-restore-map-owner.sh \
-  t/test-restore-single-file.sh \
-  t/test-rm-between-index-and-save.sh \
-  t/test-save-with-valid-parent.sh \
-  t/test-sparse-files.sh \
-  t/test-command-without-init-fails.sh \
-  t/test-redundant-saves.sh \
-  t/test-save-creates-no-unrefs.sh \
-  t/test-save-restore-excludes.sh \
-  t/test-save-strip-graft.sh \
-  t/test-import-duplicity.sh \
-  t/test-import-rdiff-backup.sh \
-  t/test-xdev.sh \
-  t/test.sh
+ifeq "2" "$(bup_python_majver)"
+  cmdline_tests := \
+    t/test-ftp \
+    t/test-save-restore \
+    t/test-packsizelimit \
+    t/test-prune-older \
+    t/test-web.sh \
+    t/test-rm.sh \
+    t/test-gc.sh \
+    t/test-main.sh \
+    t/test-list-idx.sh \
+    t/test-index.sh \
+    t/test-split-join.sh \
+    t/test-fuse.sh \
+    t/test-drecurse.sh \
+    t/test-cat-file.sh \
+    t/test-compression.sh \
+    t/test-fsck.sh \
+    t/test-index-clear.sh \
+    t/test-index-check-device.sh \
+    t/test-ls \
+    t/test-ls-remote \
+    t/test-tz.sh \
+    t/test-meta.sh \
+    t/test-on.sh \
+    t/test-restore-map-owner.sh \
+    t/test-restore-single-file.sh \
+    t/test-rm-between-index-and-save.sh \
+    t/test-save-with-valid-parent.sh \
+    t/test-sparse-files.sh \
+    t/test-command-without-init-fails.sh \
+    t/test-redundant-saves.sh \
+    t/test-save-creates-no-unrefs.sh \
+    t/test-save-restore-excludes.sh \
+    t/test-save-strip-graft.sh \
+    t/test-import-duplicity.sh \
+    t/test-import-rdiff-backup.sh \
+    t/test-xdev.sh \
+    t/test.sh
+else
+  cmdline_tests :=
+endif
 
 tmp-target-run-test-get-%: all t/tmp
        $(pf); cd $$(pwd -P); TMPDIR="$(test_tmp)" \
          t/test-get $* 2>&1 | tee -a t/tmp/test-log/$$$$.log
 
-test_get_targets := \
-  tmp-target-run-test-get-replace \
-  tmp-target-run-test-get-universal \
-  tmp-target-run-test-get-ff \
-  tmp-target-run-test-get-append \
-  tmp-target-run-test-get-pick \
-  tmp-target-run-test-get-new-tag \
-  tmp-target-run-test-get-unnamed
+ifeq "2" "$(bup_python_majver)"
+  test_get_targets := \
+    tmp-target-run-test-get-replace \
+    tmp-target-run-test-get-universal \
+    tmp-target-run-test-get-ff \
+    tmp-target-run-test-get-append \
+    tmp-target-run-test-get-pick \
+    tmp-target-run-test-get-new-tag \
+    tmp-target-run-test-get-unnamed
+else
+  test_get_targets :=
+endif
 
 # For parallel runs.
 # The "pwd -P" here may not be appropriate in the long run, but we
@@ -219,7 +231,7 @@ test: all
        if test -e t/tmp/test-log; then rm -r t/tmp/test-log; fi
        mkdir -p t/tmp/test-log
        ./wvtest watch --no-counts \
-         $(MAKE) runtests-python runtests-cmdline 2>t/tmp/test-log/$$$$.log
+         $(MAKE) runtests 2>t/tmp/test-log/$$$$.log
        ./wvtest report t/tmp/test-log/*.log
 
 check: test
index 6e01995bd94052bc9be46bf5772606e2678bf94e..3f3e2edb1e05793488acbc63def3493dfafd0356 100644 (file)
@@ -2,3 +2,4 @@ CONFIGURE_FILES=@CONFIGURE_FILES@
 GENERATED_FILES=@GENERATED_FILES@
 bup_make=@bup_make@
 bup_python=@bup_python@
+bup_python_majver=@bup_python_majver@
index 1ea6757a3df313c29f5d27b4f7db0f1c00a622b5..66f62501a1b8c37ae787a506b7abc1c35de50873 100755 (executable)
@@ -67,6 +67,8 @@ if test -z "$bup_python"; then
     AC_FAIL "ERROR: unable to find python"
 else
     AC_SUB bup_python "$bup_python"
+    AC_SUB bup_python_majver \
+           "$("$bup_python" -c 'import sys; print(sys.version_info[0])')"
 fi
 
 if test -z "$(bup_find_prog git '')"; then