mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-02-05 18:51:00 +08:00
[tests] Fix printing summary after testing confs (#3371)
This commit is contained in:
committed by
GitHub
parent
51e43fb67d
commit
4f1bd75203
14
Makefile
14
Makefile
@@ -319,10 +319,11 @@ test_mavlab: all
|
||||
|
||||
# test TU Delft conf
|
||||
test_tudelft: all
|
||||
CONF_XML=conf/userconf/tudelft/conf.xml prove tests/aircrafts/
|
||||
CONF_XML=conf/userconf/tudelft/delfly_conf.xml prove tests/aircrafts/
|
||||
CONF_XML=conf/userconf/tudelft/course_conf.xml prove tests/aircrafts/
|
||||
CONF_XML=conf/userconf/tudelft/guido_conf.xml prove tests/aircrafts/
|
||||
CONF_XML=conf/userconf/tudelft/conf.xml prove tests/aircrafts/ 2>&1 | tee ./var/compile.log
|
||||
CONF_XML=conf/userconf/tudelft/delfly_conf.xml prove tests/aircrafts/ 2>&1 | tee -a ./var/compile.log
|
||||
CONF_XML=conf/userconf/tudelft/course_conf.xml prove tests/aircrafts/ 2>&1 | tee -a ./var/compile.log
|
||||
CONF_XML=conf/userconf/tudelft/guido_conf.xml prove tests/aircrafts/ 2>&1 | tee -a ./var/compile.log
|
||||
python ./sw/tools/parse_compile_logs.py | tee ./issues.md
|
||||
|
||||
# test GVF conf
|
||||
test_gvf: all
|
||||
@@ -331,7 +332,8 @@ test_gvf: all
|
||||
|
||||
# compiles all aircrafts in conf_tests.xml
|
||||
test_examples: all
|
||||
CONF_XML=conf/conf_tests.xml prove tests/aircrafts/
|
||||
CONF_XML=conf/conf_tests.xml prove tests/aircrafts/ 2>&1 | tee ./var/compile.log
|
||||
python ./sw/tools/parse_compile_logs.py | tee ./issues.md
|
||||
|
||||
# test compilation of modules
|
||||
test_modules: all
|
||||
@@ -340,7 +342,7 @@ test_modules: all
|
||||
test_all_confs: all opencv_bebop
|
||||
$(Q)$(eval $CONFS:=$(shell ./find_confs.py))
|
||||
@echo "************\nFound $(words $($CONFS)) config files: $($CONFS)"
|
||||
$(Q)$(foreach conf,$($CONFS),echo "\n************\nTesting all aircrafts in conf: $(conf)\n************" && (CONF_XML=$(conf) prove tests/aircrafts/ || echo "failed $(conf)" >> TEST_ALL_CONFS_FAILED);) test -f TEST_ALL_CONFS_FAILED && cat TEST_ALL_CONFS_FAILED && rm -f TEST_ALL_CONFS_FAILED && exit 1; exit 0
|
||||
$(Q)$(foreach conf,$($CONFS),(CONF_XML=$(conf) prove tests/aircrafts/ || echo "failed $(conf)" >> TEST_ALL_CONFS_FAILED);) test -f TEST_ALL_CONFS_FAILED && cat TEST_ALL_CONFS_FAILED && rm -f TEST_ALL_CONFS_FAILED && exit 1; exit 0
|
||||
|
||||
# run some math tests that don't need whole paparazzi to be built
|
||||
test_math:
|
||||
|
||||
@@ -12,11 +12,12 @@ def parse_log(log_file):
|
||||
lines = f.readlines()
|
||||
|
||||
errors = []
|
||||
conf = ''
|
||||
conf = 'Unknown'
|
||||
airframe = ''
|
||||
module = ''
|
||||
|
||||
for line in lines:
|
||||
lowerline = line.lower()
|
||||
if 'Testing all aircrafts in conf: ' in line:
|
||||
conf = line.split('Testing all aircrafts in conf: ')[1].strip()
|
||||
#print(conf)
|
||||
@@ -30,9 +31,9 @@ def parse_log(log_file):
|
||||
airframe = line.strip()
|
||||
|
||||
if conf and airframe:
|
||||
if 'error:' in line:
|
||||
if ('error:' in lowerline) or ('failed:' in lowerline):
|
||||
errors.append((conf, airframe, line.strip()))
|
||||
if 'warning:' in line:
|
||||
if 'warning:' in lowerline:
|
||||
errors.append((conf, airframe, line.strip()))
|
||||
|
||||
return errors
|
||||
|
||||
@@ -43,6 +43,7 @@ my $conf_xml_file = $ENV{'CONF_XML'};
|
||||
if ($conf_xml_file eq "") {
|
||||
$conf_xml_file = "$ENV{'PAPARAZZI_HOME'}/conf/conf.xml";
|
||||
}
|
||||
warn "\n************\nTesting all aircrafts in conf: $conf_xml_file\n************\n";
|
||||
my $conf = $xmlSimple->XMLin($conf_xml_file);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user