From 78abdc88074e864013d00512ebae7df9447c124a Mon Sep 17 00:00:00 2001 From: Eunhae Choi Date: Mon, 11 Jan 2016 18:28:41 +0900 Subject: [PATCH] radio: add radio test suite and license info Change-Id: I7f935e890443f183f5359d052b2b0a33e3c95687 --- CMakeLists.txt | 6 +++--- LICENSE => LICENSE.APLv2 | 0 packaging/capi-media-radio.manifest | 9 ++++++--- packaging/capi-media-radio.spec | 9 ++++++++- src/radio.c | 0 test/radio_test_type.h | 8 +++++--- 6 files changed, 22 insertions(+), 10 deletions(-) mode change 100755 => 100644 CMakeLists.txt rename LICENSE => LICENSE.APLv2 (100%) mode change 100755 => 100644 src/radio.c diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100755 new mode 100644 index bcab29b..be0454a --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,16 +61,16 @@ CONFIGURE_FILE( ) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) -#ADD_SUBDIRECTORY(test) +ADD_SUBDIRECTORY(test) IF(UNIX) ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution) ADD_CUSTOM_COMMAND( - DEPENDS clean + DEPENDS clean COMMENT "distribution clean" COMMAND find - ARGS . + ARGS . -not -name config.cmake -and \( -name tester.c -or -name Testing -or diff --git a/LICENSE b/LICENSE.APLv2 similarity index 100% rename from LICENSE rename to LICENSE.APLv2 diff --git a/packaging/capi-media-radio.manifest b/packaging/capi-media-radio.manifest index 017d22d..a6040c4 100644 --- a/packaging/capi-media-radio.manifest +++ b/packaging/capi-media-radio.manifest @@ -1,5 +1,8 @@ - - - + + + + + + diff --git a/packaging/capi-media-radio.spec b/packaging/capi-media-radio.spec index 8a77873..dd72c64 100644 --- a/packaging/capi-media-radio.spec +++ b/packaging/capi-media-radio.spec @@ -1,7 +1,7 @@ Name: capi-media-radio Summary: A Radio library in Tizen Native API Version: 0.1.2 -Release: 11 +Release: 12 Group: API/C API License: Apache-2.0 Source0: %{name}-%{version}.tar.gz @@ -35,7 +35,12 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` make %{?jobs:-j%jobs} %install +rm -rf %{buildroot} %make_install +mkdir -p %{buildroot}/usr/share/license +mkdir -p %{buildroot}/usr/bin +cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name} +cp test/radio_test %{buildroot}/usr/bin %post -p /sbin/ldconfig @@ -46,6 +51,8 @@ make %{?jobs:-j%jobs} %manifest %{name}.manifest %defattr(-,root,root,-) %{_libdir}/libcapi-media-radio.so.* +%{_datadir}/license/%{name} +%{_bindir}/* %files devel %manifest %{name}.manifest diff --git a/src/radio.c b/src/radio.c old mode 100755 new mode 100644 diff --git a/test/radio_test_type.h b/test/radio_test_type.h index 7b23e30..39d5e0b 100755 --- a/test/radio_test_type.h +++ b/test/radio_test_type.h @@ -35,12 +35,14 @@ typedef struct __test_item { } test_item_t; #define RADIO_TEST__(x_test) \ - do { \ ret = x_test \ - if (!ret) \ + if ( ! ret ) \ + { \ printf("PASS : %s -- %s:%d\n", #x_test, __FILE__, __LINE__); \ + } \ else \ + { \ printf("FAIL : %s ERR-CODE : 0x%x -- %s:%d\n", #x_test, ret, __FILE__, __LINE__); \ - } while (0) + } #endif /* MM_RADIO_TEST_TYPE_H_ */ -- 2.7.4