Started adding a Perl test framework. Need to work out how to print JUnit test results though...

This commit is contained in:
Bernard Davison
2012-03-04 23:11:18 +11:00
parent da12d67fb5
commit debabf1697
3 changed files with 28 additions and 0 deletions
+3
View File
@@ -281,3 +281,6 @@ sw/simulator/launchsitl:
%.hgt.zip:
cd data/srtm; $(MAKE) $(@)
test: all
cd tests; $(MAKE) $(@)
+10
View File
@@ -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)
+15
View File
@@ -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);