mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-10 06:59:54 +08:00
6dbf1183bd
The JUnit results can be added by specifying JUNIT=1 from the make command line. This is important as the Bamboo server can read JUnit results and include them in the build reports. This requires that the Perl module TAP::Formatter::JUnit is installed on the host that the command is run on. The JUnit results are created under tests/results and have the name ABC.junit.xml
20 lines
500 B
Makefile
20 lines
500 B
Makefile
Q = @
|
|
PERL = perl
|
|
TEST_VERBOSE = 0
|
|
ifeq ($(TARGET_BOARD),)
|
|
TARGET_BOARD = *
|
|
endif
|
|
TEST_FILES := $(shell ls $(TARGET_BOARD)/*.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', merge => 1, } )->runtests(qw($(TEST_FILES)))
|
|
else
|
|
PERLENV=
|
|
RUNTESTS=use TAP::Harness;TAP::Harness->new()->runtests(qw($(TEST_FILES)))
|
|
endif
|
|
|
|
test:
|
|
$(Q)$(PERLENV) $(PERL) "-e" "$(RUNTESTS)"
|
|
|