Add ability to add per-test test arguments (TEST_ARGS) and command (TEST_CMD)

This commit is contained in:
Christophe de Dinechin 2017-04-01 19:19:04 +02:00
parent 0dc453c3ac
commit a6089c4090
1 changed files with 2 additions and 2 deletions

View File

@ -177,10 +177,10 @@ product.runtest: product .ALWAYS
# Run a test from a C or C++ file to link against current library
%.c.runtest: $(OBJROOT_LIB) .ALWAYS
$(PRINT_BUILD) $(MAKE) SOURCES=$*.c LINK_LIBS=$(OBJROOT_LIB) PRODUCTS=$*.exe $(TARGET)
$(PRINT_TEST) $(OBJROOT)/$*
$(PRINT_TEST) $(TEST_CMD_$*) $(OBJROOT)/$* $(TEST_ARGS_$*)
%.cpp.runtest: $(OBJROOT_LIB) .ALWAYS
$(PRINT_BUILD) $(MAKE) SOURCES=$*.cpp LINK_LIBS=$(OBJROOT_LIB) PRODUCTS=$*.exe $(TARGET)
$(PRINT_TEST) $(OBJROOT)/$*
$(PRINT_TEST) $(TEST_CMD_$*) $(OBJROOT)/$* $(TEST_ARGS_$*)
# Installing the product: always need to build it first
%.install_exe: $(PREFIX_BIN).mkdir