From b1a18a2eb677f1e79f99453639bf61a3c9b81dde Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Tue, 24 Jul 2018 15:16:57 +0900 Subject: [PATCH] [DIST] Calculate test coverage after executing unit tests. 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 --- packaging/nnstreamer.spec | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/packaging/nnstreamer.spec b/packaging/nnstreamer.spec index ee4e322..d2d95df 100644 --- a/packaging/nnstreamer.spec +++ b/packaging/nnstreamer.spec @@ -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/ -- 2.7.4