aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLumir Balhar <lbalhar@redhat.com>2018-07-09 12:38:59 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2018-11-23 17:37:56 +1100
commit8113c00b99d303c8073a2493f6b8978600e54967 (patch)
treed23de9f523907c6e03c89dbe2a1f8a9f6e8d7446 /tests
parent11738cf01f150afae913b88fb68675a272803d63 (diff)
downloaddtc-8113c00b99d303c8073a2493f6b8978600e54967.zip
dtc-8113c00b99d303c8073a2493f6b8978600e54967.tar.gz
dtc-8113c00b99d303c8073a2493f6b8978600e54967.tar.bz2
pylibfdt: Allow switch to Python 3 via environment variable PYTHON
Python 2 is still the default but it can be changed by setting environment variable PYTHON before build/test. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.tests6
-rwxr-xr-xtests/run_tests.sh2
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/Makefile.tests b/tests/Makefile.tests
index 6ddf444..8b63f60 100644
--- a/tests/Makefile.tests
+++ b/tests/Makefile.tests
@@ -81,18 +81,18 @@ tests_clean:
rm -rf $(TESTS_CLEANDIRS)
check: tests ${TESTS_BIN} $(TESTS_PYLIBFDT)
- cd $(TESTS_PREFIX); ./run_tests.sh
+ cd $(TESTS_PREFIX); PYTHON=$(PYTHON) ./run_tests.sh
ifeq ($(NO_VALGRIND),1)
checkm:
@echo "make checkm requires valgrind, but NO_VALGRIND=1"
else
checkm: tests ${TESTS_BIN} $(TESTS_PYLIBFDT)
- cd $(TESTS_PREFIX); ./run_tests.sh -m
+ cd $(TESTS_PREFIX); PYTHON=$(PYTHON) ./run_tests.sh -m
endif
checkv: tests ${TESTS_BIN} $(TESTS_PYLIBFDT)
- cd $(TESTS_PREFIX); ./run_tests.sh -v
+ cd $(TESTS_PREFIX); PYTHON=$(PYTHON) ./run_tests.sh -v
ifneq ($(DEPTARGETS),)
-include $(TESTS_DEPFILES)
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 547aedc..23e6176 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -933,7 +933,7 @@ fdtoverlay_tests() {
pylibfdt_tests () {
run_dtc_test -I dts -O dtb -o test_props.dtb test_props.dts
TMP=/tmp/tests.stderr.$$
- python pylibfdt_tests.py -v 2> $TMP
+ $PYTHON pylibfdt_tests.py -v 2> $TMP
# Use the 'ok' message meaning the test passed, 'ERROR' meaning it failed
# and the summary line for total tests (e.g. 'Ran 17 tests in 0.002s').