From 632adcd2e945a8b5e331d09057e523105eb0a584 Mon Sep 17 00:00:00 2001 From: asterix Date: Tue, 28 Oct 2008 10:42:38 +0000 Subject: [PATCH] Use variable to store Bertos dir. Check if exist bertos backup dir before to delete bertos dir. Add some info string. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1903 38d2e660-2303-0410-9eaa-f027e97ec537 --- test/nightly_test.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/test/nightly_test.sh b/test/nightly_test.sh index cb132d9d..1017089e 100755 --- a/test/nightly_test.sh +++ b/test/nightly_test.sh @@ -33,12 +33,15 @@ #Makefile test directory MAKEFILE_TEST_DIR="." TEST_DIR="test" +BERTOS_DIR="bertos/" +BERTOS_DIR_BAK="bertos.saved" #Copy BeRTOS sources -cp -R bertos/ bertos.saved/ || exit 1 +printf "Starting nightlytest..\n" +cp -R $BERTOS_DIR $BERTOS_DIR_BAK || exit 1 #Strip away TODOs and FIXME -find bertos/ -name "*.[ch]" | xargs perl -p -i -e 's/^\s*#warning\s*(TODO|FIXME).*//g;' +find $BERTOS_DIR -name "*.[ch]" | xargs perl -p -i -e 's/^\s*#warning\s*(TODO|FIXME).*//g;' #Cpu target that we want to test @@ -46,7 +49,7 @@ TRG="avr arm" for i in $TRG ; do - ${TEST_DIR}/gen_mk_src.sh $i + ${TEST_DIR}/gen_mk_src.sh $i done #Clean and launch make on all @@ -54,5 +57,14 @@ make -f ${MAKEFILE_TEST_DIR}/Makefile.test clean make -f ${MAKEFILE_TEST_DIR}/Makefile.test #Restore original sources -rm -rf bertos/ -mv bertos.saved/ bertos/ +if [ -d $BERTOS_DIR_BAK ] ; then + printf "Exiting from nightly..\n" + rm -rf $BERTOS_DIR + mv $BERTOS_DIR_BAK $BERTOS_DIR +else + printf "Unable to restore backup copy\n" + exit 1 +fi + + + -- 2.25.1