Permalink
Browse files

Moving the conf/conf.xml file back from the packup after the tests ha…

…ve run.
  • Loading branch information...
1 parent 5f5e4bd commit 527837e87c8317bfaba500fef4cf4d93682ece03 @rbdavison rbdavison committed Jul 16, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 Makefile
View
@@ -63,6 +63,7 @@ XSENS_XML = $(CONF)/xsens_MTi-G.xml
TOOLS=$(PAPARAZZI_SRC)/sw/tools
OCAML=$(shell which ocaml)
OCAMLRUN=$(shell which ocamlrun)
+BUILD_DATETIME:=$(shell date +%Y%m%d-%H%M%S)
# try to find the paparazzi multilib toolchain
TOOLCHAIN=$(shell find -L /opt/paparazzi/arm-multilib ~/sat -maxdepth 1 -type d -name arm-none-eabi 2>/dev/null | head -n 1)
@@ -259,9 +260,12 @@ ab_clean:
find sw/airborne -name '*~' -exec rm -f {} \;
replace_current_conf_xml:
- test conf/conf.xml || mv conf/conf.xml conf/conf.xml.backup.`date +%Y%m%d-%H%M%s`
+ test conf/conf.xml && mv conf/conf.xml conf/conf.xml.backup.$(BUILD_DATETIME)
cp conf/conf.xml.example conf/conf.xml
+restore_conf_xml:
+ test conf/conf.xml.backup.$(BUILD_DATETIME) && mv conf/conf.xml.backup.$(BUILD_DATETIME) conf/conf.xml
+
commands: paparazzi sw/simulator/launchsitl
paparazzi:
@@ -272,6 +276,8 @@ sw/simulator/launchsitl:
cat src/$(@F) | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
chmod a+x $@
-test: all replace_current_conf_xml
+run_tests:
cd tests; $(MAKE) test
+test: all replace_current_conf_xml run_tests restore_conf_xml
+

0 comments on commit 527837e

Please sign in to comment.