[tests] show warnings by default

This commit is contained in:
Felix Ruess
2014-11-19 15:39:46 +01:00
parent c319d770a4
commit cbb497ed66
2 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ install:
before_script: cd conf && ln -s conf_tests.xml conf.xml && cd .. before_script: cd conf && ln -s conf_tests.xml conf.xml && cd ..
script: script:
- make - make
- PAPARAZZI_SRC=$PWD PAPARAZZI_HOME=$PWD SHOW_WARNINGS_ONLY=1 J=AUTO prove tests/examples/ - PAPARAZZI_SRC=$PWD PAPARAZZI_HOME=$PWD J=AUTO prove tests/examples/
notifications: notifications:
webhooks: webhooks:
+10 -10
View File
@@ -10,17 +10,17 @@
# #
# optional environment variables: # optional environment variables:
# TEST_VERBOSE : set to 1 to print the compile output even if there was no error # TEST_VERBOSE : set to 1 to print the compile output even if there was no error
# SHOW_WARNINGS : set to 1 to print the complete compile output if there were warnings # SHOW_WARNINGS_FULL : set to 1 to print the complete compile output if there were warnings
# SHOW_WARNINGS_ONLY : set to 1 to print only the warnings # HIDE_WARNINGS : set to 1 to disable printing of warnings
# #
# environment variables passed on to make: # environment variables passed on to make:
# J=AUTO : detect number of CPUs to set jobs for parallel compilation # J=AUTO : detect number of CPUs to set jobs for parallel compilation
# #
# Examples on how to test compile all aircrafts/targets in your current conf.xml: # Examples on how to test compile all aircrafts/targets in your current conf.xml:
# only showing full compile output if there has been an error, if there were warnings only print those
# prove test/examples
# with parallel compilation and showing full output during compilation # with parallel compilation and showing full output during compilation
# J=AUTO prove tests/examples -v # J=AUTO prove tests/examples -v
# only showing full compile output if there has been an error, if there were warnings only print those
# SHOW_WARNINGS_ONLY=1 prove test/examples
# with parallel compilation and treating all warnings as errors: # with parallel compilation and treating all warnings as errors:
# J=AUTO USER_CFLAGS=-Werror prove tests/examples # J=AUTO USER_CFLAGS=-Werror prove tests/examples
# #
@@ -81,17 +81,17 @@ foreach my $aircraft (sort keys%{$conf->{'aircraft'}})
warn "$output\n"; warn "$output\n";
} }
# if successful, still print warnings if requested # if successful, still print warnings if requested
elsif ($warnings && ($ENV{'SHOW_WARNINGS'} || $ENV{'SHOW_WARNINGS_ONLY'})) { elsif ($warnings && !$ENV{'HIDE_WARNINGS'}) {
if (!$ENV{'TEST_VERBOSE'}) { if (!$ENV{'TEST_VERBOSE'}) {
warn "\nWarning: AIRCRAFT=$aircraft target=$target compiled sucessfully but had warnings:\n"; warn "\nWarning: AIRCRAFT=$aircraft target=$target compiled sucessfully but had warnings:\n";
if ($ENV{'SHOW_WARNINGS_ONLY'}) { if ($ENV{'SHOW_WARNINGS_FULL'}) {
warn "$warnings\n";
}
else {
warn "$output\n"; warn "$output\n";
} }
else {
warn "$warnings\n";
}
} }
if (!$ENV{'SHOW_WARNINGS_ONLY'}) { if ($ENV{'SHOW_WARNINGS_FULL'}) {
warn "\nAIRCRAFT=$aircraft target=$target compiled sucessfully but had warnings.\n\n"; warn "\nAIRCRAFT=$aircraft target=$target compiled sucessfully but had warnings.\n\n";
} }
} }