summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2020-03-04 15:32:47 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2020-03-04 15:32:47 +1100
commit2b5f62d109a24fd7032ed790dbf74f8dc7962313 (patch)
tree842b27c5ee69b356c364ed8e6577c4685e9012cc /tests
parent76b43dcbd18a67fa366d6383093621dfa4f7f28c (diff)
downloaddevice-tree-compiler-2b5f62d109a24fd7032ed790dbf74f8dc7962313.tar.gz
tests: Let run_tests.sh run Python tests without Makefile assistance
Currently run_tests.sh needs the $PYTHON environment variable set to correctly run pylibfdt tests. The Makefile does this for make check, but it breaks if the script is run manually. Add a fallback to handle that case. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run_tests.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index ac0ffc2..6fed97a 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -7,6 +7,10 @@ if [ -z "$CC" ]; then
CC=cc
fi
+if [ -z "$PYTHON" ]; then
+ PYTHON=python3
+fi
+
# stat differs between platforms
if [ -z "$STATSZ" ]; then
stat --version 2>/dev/null | grep -q 'GNU'