t/tmp:
mkdir t/tmp
+runtests: runtests-python runtests-cmdline
+
+python_tests := \
+ lib/bup/t/thashsplit.py \
+ lib/bup/t/toptions.py \
+ lib/bup/t/tshquote.py \
+ lib/bup/t/tvint.py \
+ lib/bup/t/txstat.py
+
ifeq "2" "$(bup_python_majver)"
- runtests: runtests-python runtests-cmdline
-else
- runtests: runtests-cmdline
+ python_tests += \
+ lib/bup/t/tbloom.py \
+ lib/bup/t/tclient.py \
+ lib/bup/t/tgit.py \
+ lib/bup/t/thelpers.py \
+ lib/bup/t/tindex.py \
+ lib/bup/t/tmetadata.py \
+ lib/bup/t/tresolve.py \
+ lib/bup/t/tvfs.py
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:
# https://groups.google.com/forum/#!topic/bup-list/9ke-Mbp10Q0
runtests-python: all t/tmp
+ mkdir -p t/tmp/test-log
$(pf); cd $$(pwd -P); TMPDIR="$(test_tmp)" \
- "$(bup_python)" wvtest.py t/t*.py lib/*/t/t*.py 2>&1 \
+ "$(bup_python)" wvtest.py $(python_tests) 2>&1 \
| tee -a t/tmp/test-log/$$$$.log
+cmdline_tests :=
+
ifeq "2" "$(bup_python_majver)"
- cmdline_tests := \
+ cmdline_tests += \
t/test-ftp \
t/test-save-restore \
t/test-packsizelimit \
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 :=
+
ifeq "2" "$(bup_python_majver)"
- test_get_targets := \
+ 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-pick \
tmp-target-run-test-get-new-tag \
tmp-target-run-test-get-unnamed
-else
- test_get_targets :=
endif
# For parallel runs.
long-check: export BUP_TEST_LEVEL=11
long-check: check
+.PHONY: check-both
+check-both:
+ $(MAKE) clean \
+ && PYTHON=python3 BUP_ALLOW_UNEXPECTED_PYTHON_VERSION=true $(MAKE) check
+ $(MAKE) clean \
+ && PYTHON=python2 $(MAKE) check
+
cmd/bup-%: cmd/%-cmd.py
rm -f $@
ln -s $*-cmd.py $@