mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
2c9f962523
Started to create some sim testing for the Microjet. Removed the test_all_examples target.
30 lines
1.0 KiB
Makefile
30 lines
1.0 KiB
Makefile
Q = @
|
|
PERL = /usr/bin/perl
|
|
TEST_VERBOSE = 0
|
|
NON_TEST_DIRS = lib|results
|
|
HARDWARE_REGEX = Lisa|Tiny|Umarim
|
|
HARDWARE_TEST_DIRS = $(shell find -L * -d 0 -type d | grep -Ev "$(NON_TEST_DIRS)" | grep -E "$(HARDWARE_REGEX)")
|
|
NON_HARDWARE_TEST_DIRS = $(shell find -L * -d 0 -type d | grep -Ev "$(NON_TEST_DIRS)" | grep -Ev "$(HARDWARE_REGEX)")
|
|
ifneq ($(TARGET_BOARD),)
|
|
TEST_DIRECTORIES = $(TARGET_BOARD)
|
|
else
|
|
ifeq ($(TEST_HARDWARE),)
|
|
TEST_DIRECTORIES = $(NON_HARDWARE_TEST_DIRS)
|
|
else
|
|
TEST_DIRECTORIES = $(NON_HARDWARE_TEST_DIRS) $(HARDWARE_TEST_DIRS)
|
|
endif
|
|
endif
|
|
TEST_FILES := $(shell ls $(TEST_DIRECTORIES:%=%/*.t))
|
|
|
|
ifneq ($(JUNIT),)
|
|
PERLENV=PERL_TEST_HARNESS_DUMP_TAP=$(PAPARAZZI_SRC)/tests/results
|
|
RUNTESTS=use TAP::Harness; TAP::Harness->new({ formatter_class => 'TAP::Formatter::JUnit', verbosity => $(TEST_VERBOSE), merge => 1, } )->runtests(qw($(TEST_FILES)))
|
|
else
|
|
PERLENV=
|
|
RUNTESTS=use TAP::Harness;TAP::Harness->new( { verbosity => $(TEST_VERBOSE) } )->runtests(qw($(TEST_FILES)))
|
|
endif
|
|
|
|
test:
|
|
$(Q)$(PERLENV) $(PERL) "-e" "$(RUNTESTS)"
|
|
|