mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 19:47:50 +08:00
Started adding a Perl test framework. Need to work out how to print JUnit test results though...
This commit is contained in:
@@ -281,3 +281,6 @@ sw/simulator/launchsitl:
|
|||||||
%.hgt.zip:
|
%.hgt.zip:
|
||||||
cd data/srtm; $(MAKE) $(@)
|
cd data/srtm; $(MAKE) $(@)
|
||||||
|
|
||||||
|
test: all
|
||||||
|
cd tests; $(MAKE) $(@)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
PERL = perl
|
||||||
|
TEST_VERBOSE=0
|
||||||
|
ifeq ($(AIRCRAFT),)
|
||||||
|
AIRCRAFT=*
|
||||||
|
endif
|
||||||
|
TEST_FILES = $(AIRCRAFT)/*.t
|
||||||
|
|
||||||
|
test:
|
||||||
|
$(PERL) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE))" $(TEST_FILES)
|
||||||
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
use Test::More tests => 5;
|
||||||
|
|
||||||
|
$|++;
|
||||||
|
|
||||||
|
ok(-f "$ENV{'PAPARAZZI_SRC'}/sw/ground_segment/tmtc/server", "The server program exists");
|
||||||
|
ok(-f "$ENV{'PAPARAZZI_SRC'}/sw/ground_segment/tmtc/link", "The link program exists");
|
||||||
|
ok(-f "$ENV{'PAPARAZZI_SRC'}/sw/ground_segment/tmtc/messages", "The messages program exists");
|
||||||
|
ok(-f "$ENV{'PAPARAZZI_SRC'}/sw/ground_segment/tmtc/settings", "The settings program exists");
|
||||||
|
ok(-f "$ENV{'PAPARAZZI_SRC'}/sw/ground_segment/cockpit/gcs", "The gcs program exists");
|
||||||
|
|
||||||
|
use Data::Dumper;
|
||||||
|
#warn Dumper(\%ENV);
|
||||||
|
|
||||||
Reference in New Issue
Block a user