From 7aef7b7cbf16f79fb17c5ace98b1bc7f15bb90fa Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Fri, 28 Dec 2018 16:25:04 +0800 Subject: BaseTools: Update PYTHON env to PYTHON_COMMAND Update PYTHON env to PYTHON_COMMAND. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Tested-by: Laszlo Ersek Tested-by: Ard Biesheuvel Reviewed-by: Bob Feng --- BaseTools/Tests/GNUmakefile | 2 +- BaseTools/Tests/PythonTest.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 BaseTools/Tests/PythonTest.py (limited to 'BaseTools/Tests') diff --git a/BaseTools/Tests/GNUmakefile b/BaseTools/Tests/GNUmakefile index d6f4e1908b..3eb52b3f83 100644 --- a/BaseTools/Tests/GNUmakefile +++ b/BaseTools/Tests/GNUmakefile @@ -14,7 +14,7 @@ all: test test: - @if command -v $(PYTHON) >/dev/null 1; then $(PYTHON) RunTests.py; else python RunTests.py; fi + @if command -v $(PYTHON_COMMAND) >/dev/null 1; then $(PYTHON_COMMAND) RunTests.py; else python RunTests.py; fi clean: find . -name '*.pyc' -exec rm '{}' ';' diff --git a/BaseTools/Tests/PythonTest.py b/BaseTools/Tests/PythonTest.py new file mode 100644 index 0000000000..cd49dc5b5d --- /dev/null +++ b/BaseTools/Tests/PythonTest.py @@ -0,0 +1,15 @@ +## @file +# Test whether PYTHON_COMMAND is available +# +# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# + +if __name__ == '__main__': + print('TRUE') -- cgit v1.2.3