From: DoHyun Pyun Date: Tue, 9 Jan 2018 00:37:23 +0000 (+0900) Subject: Seperate test rpm from the original package X-Git-Tag: submit/tizen/20180118.100229~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F166201%2F2;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-share.git Seperate test rpm from the original package Change-Id: Ifb576527cb10d76decbf7aee8610a4d594cc8739 Signed-off-by: DoHyun Pyun --- diff --git a/packaging/bluetooth-share.spec b/packaging/bluetooth-share.spec index 3c9eecc..744c1d2 100644 --- a/packaging/bluetooth-share.spec +++ b/packaging/bluetooth-share.spec @@ -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 diff --git a/unittest/bluetooth-share_test.cpp b/unittest/bluetooth-share_test.cpp index 756275a..c8c1b78 100644 --- a/unittest/bluetooth-share_test.cpp +++ b/unittest/bluetooth-share_test.cpp @@ -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) {