From f0736406f5ce055072a62a62fe9fdc7cead49671 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Tue, 18 May 2021 17:15:30 -0500 Subject: [PATCH] Fix unit test to use python3 command unit test jobs staretd to run on ubuntu-focal now and failing for using 'python' command. Change-Id: Ie002faf4c96ac7f207207a481c057b8df0289e6c --- tests/test_write_devstack_local_conf_role.sh | 2 +- tests/unittest.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_write_devstack_local_conf_role.sh b/tests/test_write_devstack_local_conf_role.sh index b2bc0a2c46..71d8d51614 100755 --- a/tests/test_write_devstack_local_conf_role.sh +++ b/tests/test_write_devstack_local_conf_role.sh @@ -6,4 +6,4 @@ TOP=$(cd $(dirname "$0")/.. && pwd) source $TOP/functions source $TOP/tests/unittest.sh -python ./roles/write-devstack-local-conf/library/test.py +${PYTHON} $TOP/roles/write-devstack-local-conf/library/test.py diff --git a/tests/unittest.sh b/tests/unittest.sh index 3703ece91d..fced2abe65 100644 --- a/tests/unittest.sh +++ b/tests/unittest.sh @@ -17,6 +17,8 @@ ERROR=0 PASS=0 FAILED_FUNCS="" +export PYTHON=$(which python3 2>/dev/null) + # pass a test, printing out MSG # usage: passed message function passed {