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:
commit
0b7fbdf3bd
2 changed files with 9 additions and 3 deletions
|
@ -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_%)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue