[DIST] Calculate test coverage after executing unit tests.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 24 Jul 2018 06:16:57 +0000 (15:16 +0900)
committer함명주/동작제어Lab(SR)/Principal Engineer/삼성전자 <myungjoo.ham@samsung.com>
Wed, 25 Jul 2018 00:56:49 +0000 (09:56 +0900)
We have moved shellscript-based tests to %install section
because of LD_LIBRARY_PATH/RPATH issue.

Thus, unit-test-coverage discovering code should move to
%install as well.

Fixes #324

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
packaging/nnstreamer.spec

index ee4e322..d2d95df 100644 (file)
@@ -76,6 +76,15 @@ pushd build
 ./unittest_sink --gst-plugin-path=./gst/tensor_converter:./gst/tensor_sink
 popd
 
+%install
+pushd build
+%make_install
+popd
+
+pushd tests
+export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
+./testAll.sh
+popd
 
 %if 0%{?testcoverage}
 ##
@@ -108,16 +117,6 @@ popd
     genhtml -o result unittest.info -t "nnstreamer %{version}-%{release} ${VCS}" --ignore-errors source -p ${RPM_BUILD_DIR}   
 %endif
 
-%install
-pushd build
-%make_install
-popd
-
-pushd tests
-export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
-./testAll.sh
-popd
-
 %if 0%{?testcoverage}
 mkdir -p %{buildroot}%{_datadir}/nnstreamer/unittest/
 cp -r result %{buildroot}%{_datadir}/nnstreamer/unittest/