--- /dev/null
+*.xml
+build
+build.log
+tct*core.h
--- /dev/null
+*.xml
+build
+build.log
#!/bin/bash
-rm -rf build
-mkdir build
+TEMP=`getopt -o rn --long rebuild,no-gen \
+ -n 'genmake' -- "$@"`
+
+if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
+
+# Note the quotes around `$TEMP': they are essential!
+eval set -- "$TEMP"
+
+opt_rebuild=false
+opt_generate=true
+
+while true ; do
+ case "$1" in
+ -r|--rebuild) opt_rebuild=true ; shift ;;
+ -n|--no-gen) opt_generate=false ; shift ;;
+ --) shift ; break ;;
+ *) shift ;; # Ignore
+ esac
+done
+
+if [ false == $opt_rebuild -o ! -d "build" ] ; then
+ rm -rf build
+ mkdir build
+fi
function build
{
- (cd src/$1; ../../scripts/tcheadgen.sh tct-$1-core.h)
- if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
- (cd build ; cmake .. -DMODULE=$1 ; make -j7 )
+ if [ $opt_generate == true -o $opt_rebuild == false ] ; then
+ (cd src/$1; ../../scripts/tcheadgen.sh tct-$1-core.h)
+ if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
+ fi
+ (cd build ; cmake .. -DMODULE=$1 ; make -j7 )
}
if [ -n "$1" ] ; then
echo BUILDING ONLY $1
build $1
-
else
for mod in `ls -1 src/ | grep -v CMakeList `
do
cd .. ;
genhtml -o build/slp/doc/coverage `find . -name dali.info`
)
+
+echo "Coverage output: ../build/slp/doc/coverage/index.html"
# Clean up old test results
rm -f tct*core-tests.xml
+# Clean up old coverage data
+if [ -d ../build/slp ] ; then
+ rm -f ../build/slp/dali-core/.libs/*.gcda
+elif [ -d ../build/tizen ] ; then
+ rm -f ../build/tizen/dali-core/.libs/*.gcda
+fi
+
+find build -name "*.gcda" -exec rm '{}' \;
+
if [ -n "$1" ] ; then
echo EXECUTING ONLY $1
execute $*
(cd src/$1; ../../scripts/tcheadgen.sh tct-$1-core.h)
if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
cp packaging/core-$1-tests.spec ../packaging
+ cp .gitignore-without-autogenerated-files .gitignore
gbs build -A armv7l --spec core-$1-tests.spec --include-all --keep-packs | \
tee build.log | stdbuf -o0 sed -e 's/error:/\x1b[1;91m&\x1b[0m/' \
-e 's/warning:/\x1b[93m&\x1b[0m/'
rm ../packaging/core-$1-tests.spec
+ cp .gitignore-with-autogenerated-files .gitignore
else
echo "Build requires a module name"
exit 1