2 # This file is part of BeRTOS.
4 # Bertos is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 # As a special exception, you may use this file as part of a free software
19 # library without restriction. Specifically, if other files instantiate
20 # templates or use macros or inline functions from this file, or you compile
21 # this file and link it with other files to produce an executable, this
22 # file does not by itself cause the resulting executable to be covered by
23 # the GNU General Public License. This exception does not however
24 # invalidate any other reasons why the executable file might be covered by
25 # the GNU General Public License.
27 # Copyright 2008 Develer S.r.l. (http://www.develer.com/)
29 # Nighlty test for BeRTOS.
31 # Author Daniele Basile <asterix@develer.com>
33 #Bertos dir, write with escape char for sed regrepx
34 BERTOS_DIR_RE="\\.\\/bertos"
36 #Test script dir, where are test script
37 TEST_SCRIPT_DIR="test"
39 #Test directory, where are the test makefile
40 TEST_APP_DIR="app/test/"
43 printf "You must specify a cpu target!\n\n"
44 printf "EXAMPLE:\n $0 <cpu target>\n\n"
49 #Get list of source for selected cpu target
50 CSRC=`${TEST_SCRIPT_DIR}/get_source_list.sh $1 c`
51 ASRC=`${TEST_SCRIPT_DIR}/get_source_list.sh $1 S`
54 #kdebug must added to skip list because it is compiled two times and the linker fail.
55 CSRC=`echo $CSRC | sed -e "s/${BERTOS_DIR_RE}\\/drv\\/kdebug\\.c//g"`
57 printf "#This makefile was generate automatically.\n\n" > ${TEST_APP_DIR}/$1_src.mk
58 printf "${1}_CSRC = $CSRC\n\n" >> ${TEST_APP_DIR}/$1_src.mk
59 printf "${1}_ASRC = $ASRC\n\n" >> ${TEST_APP_DIR}/$1_src.mk