diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2020-03-04 15:32:47 +1100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-03-04 15:32:47 +1100 |
commit | 2b5f62d109a24fd7032ed790dbf74f8dc7962313 (patch) | |
tree | 842b27c5ee69b356c364ed8e6577c4685e9012cc /tests | |
parent | 76b43dcbd18a67fa366d6383093621dfa4f7f28c (diff) | |
download | dtc-2b5f62d109a24fd7032ed790dbf74f8dc7962313.zip dtc-2b5f62d109a24fd7032ed790dbf74f8dc7962313.tar.gz dtc-2b5f62d109a24fd7032ed790dbf74f8dc7962313.tar.bz2 |
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-x | tests/run_tests.sh | 4 |
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' |