[tests] fix verbose output if TEST_VERBOSE=1, add test_examples target

This commit is contained in:
Felix Ruess
2015-03-12 18:03:35 +01:00
parent 7c35b5e292
commit 7be1f5d652
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -317,9 +317,12 @@ run_tests:
test: all replace_current_conf_xml run_tests restore_conf_xml
test_examples: all
CONF_XML=conf/conf_tests.xml prove tests/examples/
.PHONY: all print_build_version _print_building _save_build_version update_google_version dox ground_segment ground_segment.opt \
subdirs $(SUBDIRS) conf ext libpprz multimon cockpit cockpit.opt tmtc tmtc.opt generators\
static sim_static lpctools commands \
clean cleanspaces ab_clean dist_clean distclean dist_clean_irreversible \
test replace_current_conf_xml run_tests restore_conf_xml
test replace_current_conf_xml run_tests restore_conf_xml test_examples
+2 -2
View File
@@ -129,11 +129,11 @@ sub run_program
my $stderr_and_out = '';
my $stdout_handler = sub {
print @_ if $verbose;
warn @_ if $verbose;
$stderr_and_out .= $_[0];
};
my $stderr_handler = sub {
print @_ if $verbose;
warn @_ if $verbose;
# check if output on stderr contains warnings, but ignoring "Warning: low altitude"
if ($_[0] =~ /warning/i && $_[0] !~ /Warning: low altitude/) {
$warnings .= $_[0]."\n";