From: David Steele Date: Wed, 4 Oct 2023 15:56:37 +0000 (+0100) Subject: Update test harness to use matching build system X-Git-Tag: dali_2.2.48~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F47%2F299547%2F2;p=platform%2Fcore%2Fuifw%2Fdali-core.git Update test harness to use matching build system Change-Id: Ic1d88150378be4308909bc854cd24965c2f3da53 --- diff --git a/automated-tests/build.sh b/automated-tests/build.sh index 2f92135..a56cd87 100755 --- a/automated-tests/build.sh +++ b/automated-tests/build.sh @@ -32,7 +32,13 @@ function build (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 ) + BUILDSYSTEM="Unix Makefiles" + BUILDCMD=make + if [ -e ../build/tizen/build.ninja ] ; then + BUILDSYSTEM="Ninja" + BUILDCMD=ninja + fi + (cd build ; cmake .. -DMODULE=$1 -G "$BUILDSYSTEM" ; $BUILDCMD -j7 ) } if [ -n "$1" ] ; then diff --git a/automated-tests/coverage.sh b/automated-tests/coverage.sh index 96c3740..b14a11d 100755 --- a/automated-tests/coverage.sh +++ b/automated-tests/coverage.sh @@ -6,18 +6,16 @@ if [ $1 == -n ] ; then fi BUILD_DIR_NAME=tizen -function MakeCovData() -{ - ( cd ../build/$BUILD_DIR_NAME ; make cov_data ) -} - -MakeCovData -if [[ $? -ne 0 ]] -then - BUILD_DIR_NAME=tizen-cmake - MakeCovData + +BUILDSYSTEM=make + +if [ -e ../build/tizen/build.ninja ] ; then + BUILDSYSTEM=ninja fi +( cd ../build/$BUILD_DIR_NAME ; $BUILDSYSTEM cov_data ) + + # From lcov version 1.10 onwards, branch coverage is off by default and earlier versions do not support the rc option LCOV_OPTS=`if [ \`printf "\\\`lcov --version | cut -d' ' -f4\\\`\n1.10\n" | sort -V | head -n 1\` = 1.10 ] ; then echo "--rc lcov_branch_coverage=1" ; fi`