summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-10-24 08:11:22 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-10-24 13:04:40 +0000
commitacb2acccfdd34a6643e7a203e68cbe7e523a4a02 (patch)
tree3c699cba3378ff7c0ce7a8432c1e4d8ad11d6079 /BaseTools
parent4fcd5d2620386c039aa607ae5ed092624ad9543d (diff)
downloadedk2-acb2acccfdd34a6643e7a203e68cbe7e523a4a02.tar.gz
edk2-acb2acccfdd34a6643e7a203e68cbe7e523a4a02.tar.bz2
edk2-acb2acccfdd34a6643e7a203e68cbe7e523a4a02.zip
BaseTools/Tests: Use quotes around PYTHON_COMMAND
Commit ("2355f0c09c52 BaseTools: Fix check for ${PYTHON_COMMAND} in Tests/GNUmakefile") fixed a latent issue in the BaseTools/Tests Makefile, but inadvertently broke the BaseTools build for cases where PYTHON_COMMAND is not set. As it turns out, running 'command' without a command argument makes the invocation succeed, causing the empty variable to be evaluated and called later. Let's put double quotes around PYTHON_COMMAND in the invocation of 'command' and force it to fail when PYTHON_COMMAND is not set. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Tests/GNUmakefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Tests/GNUmakefile b/BaseTools/Tests/GNUmakefile
index caa4d26c9b..20b387864f 100644
--- a/BaseTools/Tests/GNUmakefile
+++ b/BaseTools/Tests/GNUmakefile
@@ -8,7 +8,7 @@
all: test
test:
- @if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then ${PYTHON_COMMAND} RunTests.py; else python RunTests.py; fi
+ @if command -v "${PYTHON_COMMAND}" >/dev/null 2>&1; then ${PYTHON_COMMAND} RunTests.py; else python RunTests.py; fi
clean:
find . -name '*.pyc' -exec rm '{}' ';'