[git commit] test: Add SIMULATOR_uclibc and SIMULATOR_glibc

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu Mar 26 23:08:45 UTC 2015


commit: http://git.uclibc.org/uClibc/commit/?id=560f416794403be952e850756d7e8b23e8fa92ac
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

where SIMULATOR_glibc is an optional simulator to run host binaries and
SIMULATOR_uclibc is an optional simulator to run target (uClibc)
binaries.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 test/README   |    3 +++
 test/Test.mak |    5 ++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/test/README b/test/README
index 28225b0..723ce6e 100644
--- a/test/README
+++ b/test/README
@@ -29,6 +29,9 @@ The following make variables may help you in testing:
 So, to just run the uClibc tests, try this:
 make check UCLIBC_ONLY=1
 
+You can pass the following 2 environment variables to "make run":
+ - make run SIMULATOR_uclibc=qemu-sh4 SIMULATOR_glibc=qemu-x86_64
+
 If you need to test just a subset of all test, delete subdirectories
 you do not need.
 
diff --git a/test/Test.mak b/test/Test.mak
index ee43a0f..a56a201 100644
--- a/test/Test.mak
+++ b/test/Test.mak
@@ -69,7 +69,7 @@ endef
 define exec_test
 	$(showtest)
 	$(Q)\
-	$(WRAPPER) $(WRAPPER_$(tst_src_name)) \
+	$(SIMULATOR) $(WRAPPER) $(WRAPPER_$(tst_src_name)) \
 	./$(binary_name) $(OPTS) $(OPTS_$(tst_src_name)) > "$(binary_name).out" 2>&1 ; \
 		ret=$$? ; \
 		expected_ret="$(RET_$(tst_src_name))" ; \
@@ -85,6 +85,9 @@ endef
 
 test check all: run
 run: $(RUN_TARGETS)
+
+$(addsuffix .exe,$(U_TARGETS)): SIMULATOR:=$(SIMULATOR_uclibc)
+$(addsuffix .exe,$(G_TARGETS)): SIMULATOR:=$(SIMULATOR_glibc)
 $(RUN_TARGETS):
 	$(exec_test)
 	$(diff_test)


More information about the uClibc-cvs mailing list