Add test rpm for obs build (#914)
author이춘석/동작제어Lab(SR)/Senior Engineer/삼성전자 <chunseok.lee@samsung.com>
Thu, 26 Apr 2018 22:30:44 +0000 (07:30 +0900)
committer서상민/동작제어Lab(SR)/Senior Engineer/삼성전자 <sangmin7.seo@samsung.com>
Thu, 26 Apr 2018 22:30:44 +0000 (07:30 +0900)
* Add test rpm for obs build

nnfw-test.rpm contains unittests and its install path
is /opt/usr/nnfw-test/

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
packaging/nnfw.spec

index 50d4537..9e29f4a 100644 (file)
@@ -28,7 +28,15 @@ nnfw is a high-performance, on-device neural network framework for Tizen
 
 %{!?build_type: %define build_type Release}
 
+%package test
+Summary: NNFW Test
+Requires: nnfw
+
+%description test
+NNFW test rpm. It does not depends on nnfw rpm since it contains nnfw runtime.
+
 %define install_prefix /usr
+%define test_install_prefix /opt/usr/nnfw-test
 
 %ifarch %{arm}
 %define target_arch armv7l
@@ -49,6 +57,8 @@ OBS_BUILD=1 BUILD_TYPE=%{build_type} INSTALL_PATH=%{buildroot}%{install_prefix}
 
 %install
 OBS_BUILD=1 BUILD_TYPE=%{build_type} INSTALL_PATH=%{buildroot}%{install_prefix} TARGET_ARCH=%{target_arch} HOST_OS=tizen make install
+mkdir -p %{buildroot}%{test_install_prefix}
+mv %{buildroot}%{install_prefix}/unittest %{buildroot}%{test_install_prefix}
 
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
@@ -58,7 +68,12 @@ OBS_BUILD=1 BUILD_TYPE=%{build_type} INSTALL_PATH=%{buildroot}%{install_prefix}
 %defattr(-,root,root,-)
 %{install_prefix}/lib/*
 %{install_prefix}/bin/*
-%{install_prefix}/unittest/*
+%exclude %{install_prefix}/unittest/*
+
+%files test
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{test_install_prefix}/unittest/*
 
 %changelog
 * Thu Mar 15 2018 Chunseok Lee <chunseok.lee@samsung.com>