unit-test-app: allow specifying subset of tests for configuration

For some test configurations, not all tests need to be run. This
change allows adding a comment in the configuration file of the
following form:

unit-test-app makefile will use it to determine which components to
build. If the comment is not present, all components will be built
(TESTS_ALL=1).

Also add test configuration for libsodium. It is a separate test
configuration due to the large binary size generated when building
libsodium tests.
This commit is contained in:
Ivan Grokhotkov
2018-04-28 18:56:25 +08:00
parent 3e64318364
commit 9b1876a458
7 changed files with 52 additions and 9 deletions

View File

@@ -5,7 +5,9 @@
LS_TESTDIR := ../libsodium/test/default
LS_TEST_OBJDIR := libsodium/test/default
ifdef TESTS_ALL
TESTS_ALL ?= 0
ifeq ($(TESTS_ALL),1)
$(info not linking libsodium tests, use 'TEST_COMPONENTS=libsodium' to test it)
else
COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME) -Wl,--no-whole-archive