IF(DEBUG_GCOV)
ADD_DEFINITIONS(-DDEBUG_GCOV)
ENDIF(DEBUG_GCOV)
-ADD_SUBDIRECTORY(unittest)
+IF(BUILD_UNITTEST)
+ ADD_SUBDIRECTORY(unittest)
+ENDIF(BUILD_UNITTEST)
IF(UNIX)
gcov objects for coverage test
%endif
+%if 0%{?asan} != 1
%package unittests
Summary: %{name} unittests binary
%description unittests
unittests binary
+%endif
%prep
%setup -q
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
cmake -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
-DLIB_PATH=%{_lib} -DDEBUG_GCOV=%{?debug_gcov:1}%{!?debug_gcov:0} \
+ -DBUILD_UNITTEST=%{?asan:0}%{!?asan:1} \
%if 0%{?model_build_feature_network_dsds} == 1
-DTIZEN_DUALSIM_ENABLE=1 \
%endif
find . -name '*.gcno' ! -iname '*mptcp*' ! -path '*/test/*' -exec cp --parents '{}' "$gcno_obj_dir" ';'
%endif
+%if 0%{?asan} != 1
cat << EOF > run-unittest.sh
#!/bin/sh
setup() {
mkdir -p %{buildroot}%{_bindir}/tizen-unittests/%{name}
install -m 0755 run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests/%{name}/
-
+%endif
%check
%if 0%{?gcov:1}
%{_datadir}/gcov/obj/*
%endif
+%if 0%{?asan} != 1
%files unittests
%{_bindir}/tct-connection-core
%{_bindir}/tizen-unittests/%{name}/run-unittest.sh
+%endif