xtest: Allow to specify the python interpreter
Explicitly use the interpreter when invoking python scripts
(i.e. scripts/file_to_c.py and scripts/rsp_to_gcm.py).
Previously, the default interpreter was used when the scripts
were called. Now, the interpreter is explicitly specified which
would hence override the default interpreter being used.
For android and makefile builds, $(PYTHON3) would be used.
On the other hand, for CMAKE based builds, the path to the
python interpreter is populated in the "Python_EXECUTABLE" variable
via the python package.
How it is helpful:
More explicit control over the version of python interpreters
that needs to be used.
Signed-off-by: Sadiq Hussain <sadiq.muchumarri@intel.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
diff --git a/host/xtest/Makefile b/host/xtest/Makefile
index ae6e21c..0040914 100644
--- a/host/xtest/Makefile
+++ b/host/xtest/Makefile
@@ -193,7 +193,7 @@
$(out-dir)/xtest/$(1).h: $(out-dir)/$(1).rsp
@echo ' GEN $$@'
- $(q)../../scripts/rsp_to_gcm_test.py --inf $$< --outf $$@ --mode=$(2) \
+ $(q)$(PYTHON3) ../../scripts/rsp_to_gcm_test.py --inf $$< --outf $$@ --mode=$(2) \
$(if $(filter y,$(CFG_GCM_NIST_VECTORS_LIMITED)),--limited)
$(CURDIR)/regression_4000.c: $(out-dir)/xtest/$(1).h
@@ -210,7 +210,7 @@
$(out-dir)/xtest/$(1).h: $(2)
@echo ' GEN $$@'
- $(q)../../scripts/file_to_c.py --inf $$< --out $$@ --name $(1)
+ $(q)$(PYTHON3) ../../scripts/file_to_c.py --inf $$< --out $$@ --name $(1)
$(CURDIR)/regression_8100.c: $(out-dir)/xtest/$(1).h
endef