--- /dev/null
+#!/usr/bin/env python
+# This file is part of BeRTOS.
+#
+# Bertos is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# As a special exception, you may use this file as part of a free software
+# library without restriction. Specifically, if other files instantiate
+# templates or use macros or inline functions from this file, or you compile
+# this file and link it with other files to produce an executable, this
+# file does not by itself cause the resulting executable to be covered by
+# the GNU General Public License. This exception does not however
+# invalidate any other reasons why the executable file might be covered by
+# the GNU General Public License.
+#
+# Copyright 2008 Develer S.r.l. (http://www.develer.com/)
+#
+# Author David Mugnai <dvd@develer.com>
+
+# This file scan a module configuration file (cfg_module.h)
+# and tries to enable all configuration options.
+# This is useful in nightly test to test all possible configurations.
+
+# A whitelist of options that should not be enabled is supplied.
+
+import sys
+import re
+
+# Options that should be left disabled
+whitelist = [
+ 'CONFIG_BATTFS_SHUFFLE_FREE_PAGES',
+ 'CONFIG_FAT_FS_READONLY',
+ 'CONFIG_INTERNAL_COMMANDS',
+ 'CONFIG_KERN_IRQ',
+ 'CONFIG_KERN_HEAP',
+ 'CONFIG_KERN_PREEMPT',
+ 'RAMP_USE_FLOATING_POINT',
+]
+
+pattern = r'\s*#define\s+(\w+)\s+(0)\W?'
+
+def f(match):
+ if match.group(1) in whitelist:
+ return match.group(0)
+ else:
+ data = match.group(0)
+ sx = match.start(2) - match.start(0)
+ ex = match.end(2) - match.end(0)
+ return data[:sx] + '1' + data[ex:]
+
+data = file(sys.argv[1]).read()
+data, count = re.subn(pattern, f, data)
+if count:
+ file(sys.argv[1], 'w').write(data)
#Strip away TODOs and FIXME
find $BERTOS_DIR -name "*.[ch]" | xargs perl -p -i -e 's/^\s*#warning\s*(TODO|FIXME).*//g;'
+ CFG_LIST=`find $BERTOS_DIR/cfg -name "cfg_*.h"`
+ for i in $CFG_LIST ;
+ do
+ $TEST_DIR/enablecfg.py $i
+ done
fi
#Cpu targets that we want to test
make -f ${MAKEFILE_TEST_DIR}/Makefile.test clean
make -f ${MAKEFILE_TEST_DIR}/Makefile.test
-
if [ $OPTS = 1 ] ; then
#Restore original sources
if [ -d $BERTOS_DIR_BAK ] ; then