g_mutex_unlock(&mc_mutex);
+#ifdef MUSE_GCOV_TEST
+ muse_core_gcov_flush();
+#endif
+
return MM_ERROR_NONE;
}
const char *path;
} muse_external_storage_info_t;
+#ifdef MUSE_GCOV_TEST
+extern void __gcov_flush(void);
+#endif
+
int muse_core_connection_close(int sock_fd);
int muse_core_set_nonblocking(int fd, bool value);
int muse_core_set_socket_timeout(int sock_fd, int timeout_sec);
int size;
} muse_msg_info_t;
+
+#ifdef MUSE_GCOV_TEST
+void muse_core_gcov_flush(void);
+void muse_core_setenv(const char *name, const char *value, int replace);
+#endif
+
bool muse_core_msg_recv_len(int fd, char *buf, int msg_len);
void muse_core_update_fd_state(int fd);
void muse_core_get_cur_time(char *time_buf);
static json_object *_muse_msg_json_find_obj(json_object *jobj, const char *find_key);
static gboolean _muse_msg_json_get_obj_value(json_object *obj, muse_core_msg_type_e m_type, void *data);
+#ifdef MUSE_GCOV_TEST
+void muse_core_gcov_flush(void)
+{
+ __gcov_flush();
+}
+
+void muse_core_setenv(const char *name, const char *value, int replace)
+{
+ setenv(name, value, replace);
+}
+
+#endif
+
static int _muse_get_valid_fd_count(int *fds)
{
int idx;
Name: mused
Summary: A multimedia daemon
-Version: 0.3.110
+Version: 0.3.111
Release: 0
Group: System/Libraries
License: Apache-2.0
export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE -D_GNU_SOURCE"
%endif
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage -DMUSE_GCOV_TEST "
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage -DMUSE_GCOV_TEST "
+export LDFLAGS+=" -lgcov "
+%endif
+
%if ("%{_vd_cfg_product_type}" == "AUDIO") || ("%{_vd_cfg_product_type}" == "TV") || ("%{_vd_cfg_product_type}" == "LFD") || ("%{_vd_cfg_product_type}" == "HTV") || ("%{_vd_cfg_product_type}" == "AV") || ("%{_vd_cfg_product_type}" == "IWB") || ("%{_vd_cfg_product_type}" == "WALL")
export CFLAGS+=" -DMUSE_REGISTER_VIP -DMUSE_USE_LWIPC -DMUSE_TTRACE_LOG"
%cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DLIBDIR=%{_libdir} -DTZ_SYS_DATA=%TZ_SYS_DATA -DMUSE_REGISTER_VIP=1 -DMUSE_TTRACE_LOG=1 -DMUSE_USE_LWIPC=1
_ms_ipc_module_cleanup(m);
LOGD("worker exit");
+
+#ifdef MUSE_GCOV_TEST
+ muse_core_gcov_flush();
+#endif
+
g_thread_exit(NULL);
return NULL;
trace_end();
#endif
+#ifdef MUSE_GCOV_TEST
+ muse_core_setenv("GCOV_PREFIX", "/tmp", 1);
+#endif
+
LOGD("Leave");
}