From b94d14d668b87c1e6f6ddad5b6aafd6b45a613b6 Mon Sep 17 00:00:00 2001 From: batt Date: Wed, 27 Aug 2008 16:09:11 +0000 Subject: [PATCH] Add a way to easily exclude a file from nightly test. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1732 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/arm/drv/pwm_arm.c | 4 ++++ bertos/cpu/arm/drv/ser_arm.c | 4 ++++ bertos/cpu/arm/drv/stepper_arm.c | 3 +++ bertos/cpu/arm/drv/twi_arm.c | 4 ++++ bertos/kern/irq.c | 4 ++++ test/gen_mk_src.sh | 15 --------------- test/get_source_list.sh | 22 ++++++++++++++++++++-- 7 files changed, 39 insertions(+), 17 deletions(-) diff --git a/bertos/cpu/arm/drv/pwm_arm.c b/bertos/cpu/arm/drv/pwm_arm.c index 9eb019b5..d643739c 100644 --- a/bertos/cpu/arm/drv/pwm_arm.c +++ b/bertos/cpu/arm/drv/pwm_arm.c @@ -36,6 +36,10 @@ * * \author Daniele Basile * + * This module is automatically included so no need to include + * in test list. + * notest: arm + * */ #include diff --git a/bertos/cpu/arm/drv/ser_arm.c b/bertos/cpu/arm/drv/ser_arm.c index 5ae15868..a2e2e8c4 100644 --- a/bertos/cpu/arm/drv/ser_arm.c +++ b/bertos/cpu/arm/drv/ser_arm.c @@ -36,6 +36,10 @@ * * \author Daniele Basile * + * This module is automatically included so no need to include + * in test list. + * notest: arm + * */ #include diff --git a/bertos/cpu/arm/drv/stepper_arm.c b/bertos/cpu/arm/drv/stepper_arm.c index d27402c0..a51abf84 100644 --- a/bertos/cpu/arm/drv/stepper_arm.c +++ b/bertos/cpu/arm/drv/stepper_arm.c @@ -36,6 +36,9 @@ * * \author Daniele Basile * + * This module is automatically included so no need to include + * in test list. + * notest: arm */ #include diff --git a/bertos/cpu/arm/drv/twi_arm.c b/bertos/cpu/arm/drv/twi_arm.c index 4b67aea8..5a3cbe1c 100644 --- a/bertos/cpu/arm/drv/twi_arm.c +++ b/bertos/cpu/arm/drv/twi_arm.c @@ -36,6 +36,10 @@ * * \author Daniele Basile * + * This module is automatically included so no need to include + * in test list. + * notest: arm + * */ #include diff --git a/bertos/kern/irq.c b/bertos/kern/irq.c index dba432ef..9a1ff514 100644 --- a/bertos/kern/irq.c +++ b/bertos/kern/irq.c @@ -33,6 +33,10 @@ * * \version $Id: proc.h 1646 2008-08-17 13:49:48Z bernie $ * \author Bernie Innocenti + * + * Still in development, disable nightly test for now + * notest: avr + * notest: arm */ #include "irq.h" diff --git a/test/gen_mk_src.sh b/test/gen_mk_src.sh index ac642824..fd487f3e 100755 --- a/test/gen_mk_src.sh +++ b/test/gen_mk_src.sh @@ -39,10 +39,6 @@ TEST_SCRIPT_DIR="test" #Test directory, where are the test makefile TEST_APP_DIR="app/test/" -#Dir list for ARM, write with escape char for sed regrepx -ARM_DRV="${BERTOS_DIR_RE}\\/cpu\\/arm\\/drv" -ARM_DRV_C_EXCLUDE_LIST="ser_arm pwm_arm twi_arm stepper_arm" - if [ $# \< 1 ] ; then printf "You must specify a cpu target!\n\n" printf "EXAMPLE:\n $0 \n\n" @@ -58,17 +54,6 @@ ASRC=`${TEST_SCRIPT_DIR}/get_source_list.sh $1 S` #kdebug must added to skip list because it is compiled two times and the linker fail. CSRC=`echo $CSRC | sed -e "s/${BERTOS_DIR_RE}\\/drv\\/kdebug\\.c//g"` -#Source to skip: - -if [ $1 = 'arm' ] ; then - for i in $ARM_DRV_C_EXCLUDE_LIST ; - do - CSRC=`echo $CSRC | sed -e "s/${ARM_DRV}\\/$i\\.c//g"` - done -fi - - - printf "#This makefile was generate automatically.\n\n" > ${TEST_APP_DIR}/$1_src.mk printf "${1}_CSRC = $CSRC\n\n" >> ${TEST_APP_DIR}/$1_src.mk printf "${1}_ASRC = $ASRC\n\n" >> ${TEST_APP_DIR}/$1_src.mk diff --git a/test/get_source_list.sh b/test/get_source_list.sh index b58f6824..ef6bd50a 100755 --- a/test/get_source_list.sh +++ b/test/get_source_list.sh @@ -45,16 +45,34 @@ if [ $# \< 2 ] ; then exit 1 fi - +CPU_TARGET=$1 #Create a list of source file whitout a cpu specific source GEN_SRC=`find . \( -name \.svn -prune -o -path $CPU_DIR -prune -o -path $APP_DIR -prune -o -path $OS_DIR -prune -o -path $EMUL_DIR -prune \) -o -name *.${2} -print | xargs` #Select c and asm sources for selected cpu target -TRG_SRC=`find ${CPU_DIR}/${1} -name \.svn -prune -o -name *.${2} -print | xargs` +TRG_SRC=`find ${CPU_DIR}/$CPU_TARGET -name \.svn -prune -o -name *.${2} -print | xargs` #Generate a list of all source for each cpu SRC_ALL=${GEN_SRC}" "${TRG_SRC} +# Find the files that contain the string +# NOTEST and put it in a list + +NOTEST="notest:" +for src in $SRC_ALL ; +do + grep "$NOTEST\s*$CPU_TARGET" $src 2>&1 > /dev/null + if [ $? = 0 ] ; then + EXCLUDE_LIST+=$src + fi +done + +# Remove the exclude list files from the sources to be +# compiled +for src in $EXCLUDE_LIST ; +do + SRC_ALL=`echo $SRC_ALL | sed -e "s;$src;;g"` +done printf "${SRC_ALL}" -- 2.25.1