From 7be1f5d6529aa67d84c8ee26d2523ba5ae9c3ae4 Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Thu, 12 Mar 2015 18:03:35 +0100 Subject: [PATCH] [tests] fix verbose output if TEST_VERBOSE=1, add test_examples target --- Makefile | 5 ++++- tests/examples/01_compile_all_aircrafts.t | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 58324688a6..c00b11b64e 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/tests/examples/01_compile_all_aircrafts.t b/tests/examples/01_compile_all_aircrafts.t index d597c7d154..5f04c37924 100644 --- a/tests/examples/01_compile_all_aircrafts.t +++ b/tests/examples/01_compile_all_aircrafts.t @@ -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";