1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 04:45:24 +03:00

Merge pull request #7486 from mikeller/add_exemplary_tests

Added 'test-representative' make target to run a representative subset of the unit tests.
This commit is contained in:
Michael Keller 2019-01-29 16:28:13 +13:00 committed by GitHub
commit 0b7fbdf3bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -426,6 +426,8 @@ TEST_SRCS = $(sort $(wildcard $(TEST_DIR)/*.cc))
TEST_BASENAMES = $(TEST_SRCS:$(TEST_DIR)/%.cc=%)
TESTS = $(foreach test,$(TEST_BASENAMES),$(if $($(test)_EXPAND),$(foreach \
target,$(filter-out $($(test)_BLACKLIST),$(VALID_TARGETS)),$(test).$(target)),$(test)))
TESTS_REPRESENTATIVE = $(foreach test,$(TEST_BASENAMES),$(if $($(test)_EXPAND),$(test).$(word \
1,$(filter-out $($(test)_BLACKLIST),$(VALID_TARGETS))),$(test)))
# All Google Test headers. Usually you shouldn't change this
# definition.
@ -441,6 +443,9 @@ include ../../make/build_verbosity.mk
## test : Build and run the Unit Tests (default goal)
test: $(TESTS:%=test_%)
## test-representative : Build and run a representative subset of the Unit Tests (i.e. run every expanded test only for the first target)
test-representative: $(TESTS_REPRESENTATIVE:%=test_%)
## junittest : Build and run the Unit Tests, producing Junit XML result files."
junittest: EXEC_OPTS = "--gtest_output=xml:$<_results.xml"
junittest: $(TESTS:%=test_%)