From 74912a3884879870011a857aac2870e2674b6568 Mon Sep 17 00:00:00 2001 From: Suyeon Hwang Date: Mon, 25 Jul 2022 11:26:26 +0900 Subject: [PATCH] Fix line coverage scope and test option This patch reduces the scope for checking line coverage. The line coverage is for checking client API, so other files in this repo is not target of the line coverage test. Change-Id: Ib93c7f6a49dc72d4f6c580c3d69ab393f9ed5294 Signed-off-by: Suyeon Hwang --- packaging/stt.spec | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/packaging/stt.spec b/packaging/stt.spec index df89bbf..06d80ee 100644 --- a/packaging/stt.spec +++ b/packaging/stt.spec @@ -40,6 +40,11 @@ BuildRequires: pkgconfig(farfield-voice-api) BuildRequires: cmake +%if 0%{?gcov:1} +BuildRequires: lcov +BuildRequires: zip +%endif + %description Speech To Text client library and daemon. @@ -142,6 +147,18 @@ mv -f org.tizen.voice.sttserver.tv.service org.tizen.voice.sttserver.service builddir=$(basename $PWD) gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir" mkdir -p "$gcno_obj_dir" +find ./server/ -name '*.gcno' -exec rm {} \; +find ./engine-parser/ -name '*.gcno' -exec rm {} \; +find ./test/ -name '*.gcno' -exec rm {} \; +find ./tests/ -name '*.gcno' -exec rm {} \; +find . -name '*_client.c.gcno' -exec rm {} \; +find . -name '*_dbus.c.gcno' -exec rm {} \; +find . -name 'stt_config*.gcno' -exec rm {} \; +find . -name '*_engine.c.gcno' -exec rm {} \; +find . -name 'sttd*.gcno' -exec rm {} \; +find . -name '*_file*.gcno' -exec rm {} \; +find . -name '*_network.c.gcno' -exec rm {} \; +find . -name '*_setting.c.gcno' -exec rm {} \; find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';' %endif @@ -156,7 +173,7 @@ setup() { test_main() { echo "test_main start" - launch_app org.tizen.stt-unittests + launch_app org.tizen.stt-unittests __AUL_SDK__ UNIT_TEST __LAUNCH_APP_MODE__ SYNC } teardown() { -- 2.7.4