diff options
author | Jeongmo Yang <jm80.yang@samsung.com> | 2018-04-19 15:22:29 +0900 |
---|---|---|
committer | Jeongmo Yang <jm80.yang@samsung.com> | 2018-04-19 15:22:29 +0900 |
commit | bd0c697da87281a12321ed34c155f05760782542 (patch) | |
tree | b5352f0488cc5f34917565e1249fdc9136d3a04d | |
parent | a6fcce5f75411988c77f019b037897265c3edb4b (diff) | |
download | mm-hal-interface-bd0c697da87281a12321ed34c155f05760782542.tar.gz mm-hal-interface-bd0c697da87281a12321ed34c155f05760782542.tar.bz2 mm-hal-interface-bd0c697da87281a12321ed34c155f05760782542.zip |
Build gtest package for multimedia HAL APIs without additional step
- Remove tc_env_setup.sh script
- Change camera HAL tc name from camera_hal_tc to camera_hal_gtests
[Version] 0.0.5
[Profile] Common
[Issue Type] Update
[Dependency module] N/A
Change-Id: I0329e20de1ffa0ec85f389b82d2b8455ccbbbcb2
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r-- | Makefile.am (renamed from testcase/build/Makefile.am) | 0 | ||||
-rwxr-xr-x | autogen.sh (renamed from testcase/build/autogen.sh) | 0 | ||||
-rw-r--r-- | configure.ac (renamed from testcase/build/configure.ac) | 10 | ||||
-rw-r--r-- | mm-hal-gtests.manifest (renamed from testcase/build/mm-hal-testcase.manifest) | 0 | ||||
-rw-r--r-- | packaging/mm-hal-interface.spec | 33 | ||||
-rwxr-xr-x | tc_env_setup.sh | 56 | ||||
-rw-r--r-- | testcase/Makefile.am | 2 | ||||
-rw-r--r-- | testcase/camera/Makefile.am | 10 |
8 files changed, 35 insertions, 76 deletions
diff --git a/testcase/build/Makefile.am b/Makefile.am index efb1910..efb1910 100644 --- a/testcase/build/Makefile.am +++ b/Makefile.am diff --git a/testcase/build/autogen.sh b/autogen.sh index 2f43082..2f43082 100755 --- a/testcase/build/autogen.sh +++ b/autogen.sh diff --git a/testcase/build/configure.ac b/configure.ac index ec4cd95..3898f00 100644 --- a/testcase/build/configure.ac +++ b/configure.ac @@ -18,16 +18,6 @@ AC_PROG_GCC_TRADITIONAL AC_PROG_LIBTOOL # Checks for libraries. -AC_ARG_ENABLE(tc-camera, AC_HELP_STRING([--enable-tc-camera], [enable tc-camera]), -[ - case "${enableval}" in - yes) TC_CAMERA=yes ;; - no) TC_CAMERA=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-tc-camera) ;; - esac -],[TC_CAMERA=no]) -AM_CONDITIONAL([TC_CAMERA], [test "x$TC_CAMERA" = "xyes"]) - PKG_CHECK_MODULES(GLIB, glib-2.0) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) diff --git a/testcase/build/mm-hal-testcase.manifest b/mm-hal-gtests.manifest index a76fdba..a76fdba 100644 --- a/testcase/build/mm-hal-testcase.manifest +++ b/mm-hal-gtests.manifest diff --git a/packaging/mm-hal-interface.spec b/packaging/mm-hal-interface.spec index ab96996..7bb2129 100644 --- a/packaging/mm-hal-interface.spec +++ b/packaging/mm-hal-interface.spec @@ -1,28 +1,55 @@ Name: mm-hal-interface Summary: Multimedia HAL Interface -Version: 0.0.4 +Version: 0.0.5 Release: 0 Group: Multimedia/Development License: Apache-2.0 Source0: %{name}-%{version}.tar.gz -BuildArch: noarch %description Multimedia framework hardware abstraction layer interface package. + +%package -n camera-hal-gtests +Summary: gtest for camera HAL APIs +Group: Development/Tools +Version: %{version} +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(dlog) +BuildRequires: gtest-devel + +%description -n camera-hal-gtests +gtest for camera HAL APIs. + + %prep %setup -q %build - +export CFLAGS+=" -D_LARGEFILE64_SOURCE" +./autogen.sh +%configure --disable-static +make %{?jobs:-j%jobs} %install install -d -m 755 %{buildroot}%{_includedir} install -m 644 include/audio/*.h %{buildroot}%{_includedir} install -m 644 include/camera/*.h %{buildroot}%{_includedir} install -m 644 include/radio/*.h %{buildroot}%{_includedir} +%make_install + +%post -n camera-hal-gtests -p /sbin/ldconfig +%postun -n camera-hal-gtests -p /sbin/ldconfig %files %defattr(-,root,root,-) %{_includedir}/*.h %license LICENSE.APLv2 + +%files -n camera-hal-gtests +%manifest mm-hal-gtests.manifest +%license LICENSE.APLv2 +%defattr(-,root,root,-) +%{_bindir}/camera_* diff --git a/tc_env_setup.sh b/tc_env_setup.sh deleted file mode 100755 index f3b2a97..0000000 --- a/tc_env_setup.sh +++ /dev/null @@ -1,56 +0,0 @@ -#! /bin/sh - -# variable -tc_build_dir=testcase/build -tc_build_files="Makefile.am autogen.sh configure.ac mm-hal-testcase.manifest" -spec_path_interface=packaging/mm-hal-interface.spec -spec_path_testcase=packaging/mm-hal-testcase.spec - -# usage -print_usage() -{ - echo "[usage] : $0 [y|n]" - echo " - y : set up environment to build testcase" - echo " - n : remove environment to build testcase" - exit 0 -} - -# check argument -if [ $# != 1 ] -then - - print_usage - -fi - -if [ $1 = "y" ] -then - # set up TC build environment - for file in $tc_build_files - do - mv $tc_build_dir/$file . - done - - mv $spec_path_interface $spec_path_interface.bak - mv $spec_path_testcase.bak $spec_path_testcase - -elif [ $1 = "n" ] -then - # reset TC build environment - for file in $tc_build_files - do - mv $file $tc_build_dir - done - - mv $spec_path_interface.bak $spec_path_interface - mv $spec_path_testcase $spec_path_testcase.bak - -else - - echo "Unknown argument : $1" - print_usage - -fi - -exit 0 - diff --git a/testcase/Makefile.am b/testcase/Makefile.am index 32fae42..ac1b359 100644 --- a/testcase/Makefile.am +++ b/testcase/Makefile.am @@ -1,4 +1,2 @@ -if TC_CAMERA SUBDIRS = camera -endif diff --git a/testcase/camera/Makefile.am b/testcase/camera/Makefile.am index 1699fa8..13e0782 100644 --- a/testcase/camera/Makefile.am +++ b/testcase/camera/Makefile.am @@ -1,12 +1,12 @@ # with gtest -bin_PROGRAMS = camera_hal_tc +bin_PROGRAMS = camera_hal_gtests -camera_hal_tc_SOURCES = camera_hal_tc.cpp camera_hal_interface.c +camera_hal_gtests_SOURCES = camera_hal_tc.cpp camera_hal_interface.c -camera_hal_tc_CFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS) -camera_hal_tc_CPPFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS) +camera_hal_gtests_CFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS) +camera_hal_gtests_CPPFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS) -I$(srcdir)/../../include/camera -camera_hal_tc_LDADD = \ +camera_hal_gtests_LDADD = \ -ldl \ -lgtest \ $(GLIB_LIBS) \ |