Files
paparazzi/tests/Makefile
T
Bernard Davison 569380667a Forcing make test to use /usr/bin/perl instead of the perl from the path.
This is required since we could be picking up Perl from /opt/paparazzi/bin/perl which won't have the required modules installed.
2012-03-07 10:24:55 +11:00

20 lines
509 B
Makefile

Q = @
PERL = /usr/bin/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)"