Fix line coverage scope and test option 64/278664/2
authorSuyeon Hwang <stom.hwang@samsung.com>
Mon, 25 Jul 2022 02:26:26 +0000 (11:26 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Mon, 25 Jul 2022 05:48:40 +0000 (14:48 +0900)
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 <stom.hwang@samsung.com>
packaging/stt.spec

index df89bbf..06d80ee 100644 (file)
@@ -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() {