From 0d5f6063e58f178cb3eb616f12e6f903a8f3849a Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Thu, 12 Mar 2015 18:49:02 +0100 Subject: [PATCH] [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) --- .travis.yml | 4 +--- Makefile | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a1bc1b32b..a19c172d38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/Makefile b/Makefile index c00b11b64e..6401791e93 100644 --- a/Makefile +++ b/Makefile @@ -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