Verified Commit 1fbfe09c authored by Karel Koci's avatar Karel Koci 🤘

Add automatically build usign

We need usign to implement signature verification tests. This adds it
and ensures that it is build when tests are run.
parent 146319f1
......@@ -4,3 +4,6 @@
[submodule "tests/lunit-launch/lunit"]
path = tests/lunit-launch/lunit
url = http://repo.or.cz/lunit.git
[submodule "tests/usign"]
path = tests/usign
url = git://git.openwrt.org/project/usign.git
......@@ -75,10 +75,16 @@ valgrind: $(addprefix valgrind-lua-,$(LUA_TESTS))
luac-autoload: $(addprefix luac-autoload-,$(LUA_AUTOLOAD))
luacheck: $(addprefix luacheck-,$(LUA_AUTOLOAD))
# Use the FORCE target instead of .PHONY, since .PHONY doesn't work well
# with patterned recipes. The FORCE comes from our shared build system.
USIGN_DIR = $(O)/tests/usign
USIGN_EXEC = $(USIGN_DIR)/usign
$(USIGN_EXEC):
cd "$(USIGN_DIR)" && cmake .
+$(MAKE) -C "$(USIGN_DIR)"
clean-usign:
+$(MAKE) -C "$(USIGN_DIR)" clean
TESTS_ENV = SUPPRESS_LOG=1 S=$(S) TMPDIR=$(abspath $(O)/testdir) COVERAGEDIR=$(abspath $(O)/.lua_coverage)
TESTS_ENV = SUPPRESS_LOG=1 S=$(S) TMPDIR=$(abspath $(O)/testdir) COVERAGEDIR=$(abspath $(O)/.lua_coverage) PATH="$$PATH:$(USIGN_DIR)"
ifeq (,$(OPENSSL_PURITY))
include $(S)/tests/openssl_purity.mk
......@@ -88,20 +94,23 @@ OPENSSL_LIBS=
OPENSSL_ENV=
endif
# Use the FORCE target instead of .PHONY, since .PHONY doesn't work well
# with patterned recipes. The FORCE comes from our shared build system.
# Tests
test-c-%: $(O)/bin/ctest-% FORCE
test-c-%: $(O)/bin/ctest-% $(USIGN_EXEC) FORCE
mkdir -p $(O)/testdir
$(TESTS_ENV) $<
valgrind-c-%: $(O)/bin/ctest-% $(OPENSSL_LIBS) FORCE
valgrind-c-%: $(O)/bin/ctest-% $(OPENSSL_LIBS) $(USIGN_EXEC) FORCE
mkdir -p $(O)/testdir
CK_FORK=no $(TESTS_ENV) $(OPENSSL_ENV) $(VALGRIND) $<
test-lua-%: $(S)/tests/%.lua $(O)/bin/lulaunch FORCE
test-lua-%: $(S)/tests/%.lua $(O)/bin/lulaunch $(USIGN_EXEC) FORCE
mkdir -p $(O)/testdir
$(TESTS_ENV) $(O)/bin/lulaunch $<
valgrind-lua-%: $(S)/tests/%.lua $(O)/bin/lulaunch $(OPENSSL_LIBS) FORCE
valgrind-lua-%: $(S)/tests/%.lua $(O)/bin/lulaunch $(OPENSSL_LIBS) $(USIGN_EXEC) FORCE
mkdir -p $(O)/testdir
$(TESTS_ENV) $(OPENSSL_ENV) $(VALGRIND) $(O)/bin/lulaunch $<
......
usign @ 3e6648b1
Subproject commit 3e6648b1356e54bcee351b8f5dbfacc6ee9dab53
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment