Seperate test rpm from the original package 01/166201/2
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 9 Jan 2018 00:37:23 +0000 (09:37 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 9 Jan 2018 00:57:41 +0000 (09:57 +0900)
Change-Id: Ifb576527cb10d76decbf7aee8610a4d594cc8739
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
packaging/bluetooth-share.spec
unittest/bluetooth-share_test.cpp

index 3c9eecc..744c1d2 100644 (file)
@@ -62,6 +62,16 @@ Requires:   %{name} = %{version}-%{release}
 %description -n libbluetooth-share-devel
 Development package for libbluetooth-share
 
+%if 0%{?gtests:1}
+%package test
+Summary: Test package for bluetooth-share
+Group:   TO_BE/FILLED
+Requires: %{name} = %{version}-%{release}
+
+%description test
+This package is C-API test application.
+%endif
+
 %prep
 %setup -q
 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} .
@@ -115,12 +125,6 @@ ln -sf %{_libdir}/systemd/system/bluetooth-share.service %{_sysconfdir}/systemd/
 %{_libdir}/systemd/system/bluetooth-share.service
 %{upgrade_script_path}/500.bluetooth-share_upgrade.sh
 %{upgrade_data_path}/init_db.sh
-%if 0%{?gtests:1}
-%{_bindir}/gtest-bluetooth-share
-%exclude %{_libdir}/libbt-share.so*
-%exclude %{_libdir}/debug/*
-%exclude %{_libdir}/debug/.build-id/*
-%endif
 
 %files -n libbluetooth-share
 %manifest libbluetooth-share.manifest
@@ -134,3 +138,12 @@ ln -sf %{_libdir}/systemd/system/bluetooth-share.service %{_sysconfdir}/systemd/
 %{_includedir}/bluetooth-share-api/bluetooth-share-api.h
 %{_libdir}/libbluetooth-share-api.so
 %{_libdir}/pkgconfig/bluetooth-share-api.pc
+
+%if 0%{?gtests:1}
+%files test
+%manifest %{name}.manifest
+%{_bindir}/gtest-bluetooth-share
+%{_libdir}/libbt-share.so*
+%exclude %{_libdir}/debug/*
+%exclude %{_libdir}/debug/.build-id/*
+%endif
\ No newline at end of file
index 756275a..c8c1b78 100644 (file)
@@ -40,10 +40,10 @@ TEST(BluetoothShare_test, _bt_share_block_sleep_p) {
        int ret = BT_SHARE_ERROR_NONE;
 
        ret = _bt_share_block_sleep(TRUE);
-       ASSERT_FALSE(ret == BT_SHARE_ERROR_NONE);
+       ASSERT_TRUE(ret == BT_SHARE_ERROR_NONE);
 
        ret = _bt_share_block_sleep(FALSE);
-       ASSERT_FALSE(ret == BT_SHARE_ERROR_NONE);
+       ASSERT_TRUE(ret == BT_SHARE_ERROR_NONE);
 }
 
 int main(int argc, char **argv) {