mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
Adding JUnit result output
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
This commit is contained in:
+14
-5
@@ -1,10 +1,19 @@
|
||||
Q = @
|
||||
PERL = perl
|
||||
TEST_VERBOSE=0
|
||||
ifeq ($(AIRCRAFT),)
|
||||
AIRCRAFT=*
|
||||
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_FILES = $(AIRCRAFT)/*.t
|
||||
|
||||
test:
|
||||
$(PERL) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE))" $(TEST_FILES)
|
||||
$(Q)$(PERLENV) $(PERL) "-e" "$(RUNTESTS)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user