From 7534a18a0b0c1c9efab3c5e15f8f23217a1aa160 Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Thu, 7 Dec 2017 19:45:31 +0900 Subject: [PATCH] fix unittest error about EFL and LCOV_EXCL_START/STOP Change-Id: I3bd1ec688d3895619c4074a8f79d9245f629b111 Signed-off-by: jinwang.an --- src/system_setting_unittest.c | 2 +- unittest.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/system_setting_unittest.c b/src/system_setting_unittest.c index 5d13512..ff6a5d8 100644 --- a/src/system_setting_unittest.c +++ b/src/system_setting_unittest.c @@ -6,7 +6,7 @@ extern void unittest_api(); int main(int argc, char* argv[]) { - eina_init(); + ecore_evas_init(); g_test_init(&argc, &argv, NULL); g_test_set_nonfatal_assertions(); diff --git a/unittest.sh b/unittest.sh index 0cc9947..5fb7823 100755 --- a/unittest.sh +++ b/unittest.sh @@ -30,6 +30,9 @@ sudo gbs build -A $ARCH --include-all --define "run_tests 1" || exit 1 RPM_ROOT=$RPATH +sudo mkdir -p /home/abuild/rpmbuild/BUILD/$APP-$VERSHORT +sudo cp -rf . /home/abuild/rpmbuild/BUILD/$APP-$VERSHORT + SDB=/usr/bin/sdb $SDB root on $SDB shell mount -o remount,rw / @@ -43,7 +46,7 @@ $SDB shell rpm -Uvh --force --nodeps /opt/$APP-debugsource-$VER.$ARCH.rpm echo "UNIT TEST----------------------------------------------------" export GCOV_PREFIX=/opt -$SDB shell G_DEBUG=fatal-criticals GCOV_PREFIX=/usr/src/packages GCOV_PREFIX_STRIP=3 /usr/local/bin/system-setting-unittest +$SDB shell su - -c "G_DEBUG=fatal-criticals GCOV_PREFIX=/usr/src/packages GCOV_PREFIX_STRIP=3 /usr/local/bin/system-setting-unittest" echo "COVERAGE TEST----------------------------------------------------" sdb pull /usr/src/packages/BUILD/$APP-$VERSHORT/ -- 2.7.4