From 2b5f62d109a24fd7032ed790dbf74f8dc7962313 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 4 Mar 2020 15:32:47 +1100 Subject: 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 --- tests/run_tests.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') 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' -- cgit v1.2.1