mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 14:18:00 +08:00
[tests] simplify test targets
no more moving and restoring of the conf.xml Test targets available now: - test_math: doesn't care about conf nor needs any other pprz code built - test_examples: compiles all aircrafts in conf_tests.xml, doesn't care about conf.xml - test_sim: needs a valid conf.xml with the appropriate aircrafts (Microjet for now) - test: only calls test_math and test_examples for now (no X needed, conf.xml is not read)
This commit is contained in:
+1
-3
@@ -9,9 +9,7 @@ before_install:
|
||||
install:
|
||||
- sudo apt-get install paparazzi-dev paparazzi-jsbsim gcc-arm-none-eabi libipc-run-perl
|
||||
script:
|
||||
- make
|
||||
- make -C tests/math test
|
||||
- PAPARAZZI_SRC=$PWD PAPARAZZI_HOME=$PWD CONF_XML=$PWD/conf/conf_tests.xml prove tests/examples/
|
||||
- make test
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
|
||||
@@ -304,25 +304,24 @@ ab_clean:
|
||||
#
|
||||
# Tests
|
||||
#
|
||||
test: test_math test_examples
|
||||
|
||||
replace_current_conf_xml:
|
||||
test conf/conf.xml && mv conf/conf.xml conf/conf.xml.backup.$(BUILD_DATETIME)
|
||||
cp conf/conf_tests.xml conf/conf.xml
|
||||
|
||||
restore_conf_xml:
|
||||
test conf/conf.xml.backup.$(BUILD_DATETIME) && mv conf/conf.xml.backup.$(BUILD_DATETIME) conf/conf.xml
|
||||
|
||||
run_tests:
|
||||
cd tests; $(MAKE) test
|
||||
|
||||
test: all replace_current_conf_xml run_tests restore_conf_xml
|
||||
|
||||
# compiles all aircrafts in conf_tests.xml
|
||||
test_examples: all
|
||||
CONF_XML=conf/conf_tests.xml prove tests/examples/
|
||||
|
||||
# run some math tests that don't need whole paparazzi to be built
|
||||
test_math:
|
||||
make -C tests/math
|
||||
|
||||
# super simple simulator test, needs X
|
||||
# always uses conf/conf.xml, so that needs to contain the appropriate aircrafts
|
||||
# (only Microjet right now)
|
||||
test_sim: all
|
||||
prove tests/sim
|
||||
|
||||
.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_examples
|
||||
test test_examples test_math test_sim
|
||||
|
||||
Reference in New Issue
Block a user