aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYong-iL Joh <yong-il.joh@windriver.com>2016-03-04 17:04:28 +0900
committerYong-iL Joh <yong-il.joh@windriver.com>2016-03-04 22:08:00 +0900
commit61e2507b395f6fd6dd43cc611e20565c3b0c56be (patch)
treec2c7d62122bb4ceb52fe36b3873d2a3c5f58de58
parent07a4053cb4b73a69ef2c2c1be5749a3bf6c0bf96 (diff)
downloadmeta-ivi-61e2507b395f6fd6dd43cc611e20565c3b0c56be.tar.gz
meta-ivi-61e2507b395f6fd6dd43cc611e20565c3b0c56be.tar.bz2
meta-ivi-61e2507b395f6fd6dd43cc611e20565c3b0c56be.zip
dlt-daemon: create *-test package
Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
-rw-r--r--meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon/0001-change-file-position-for-dlt-test-filetransfer.patch41
-rw-r--r--meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend26
-rw-r--r--meta-ivi/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb4
3 files changed, 71 insertions, 0 deletions
diff --git a/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon/0001-change-file-position-for-dlt-test-filetransfer.patch b/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon/0001-change-file-position-for-dlt-test-filetransfer.patch
new file mode 100644
index 0000000..65be18e
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon/0001-change-file-position-for-dlt-test-filetransfer.patch
@@ -0,0 +1,41 @@
+From f1bc578f41bfeec2c6bcbe89406bf04ada412b74 Mon Sep 17 00:00:00 2001
+From: Yong-iL Joh <yong-il.joh@windriver.com>
+Date: Fri, 4 Mar 2016 16:02:54 +0900
+Subject: [PATCH] change file position for dlt-test-filetransfer
+
+Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
+---
+ src/tests/CMakeLists.txt | 2 +-
+ src/tests/dlt-test-filetransfer.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
+index 6a6a962..bd6808e 100644
+--- a/src/tests/CMakeLists.txt
++++ b/src/tests/CMakeLists.txt
+@@ -58,5 +58,5 @@ install(TARGETS dlt-test-multi-process dlt-test-multi-process-client dlt-test-us
+ COMPONENT base)
+
+ INSTALL(FILES dlt-test-filetransfer-file dlt-test-filetransfer-image.png
+- DESTINATION /usr/share/dlt-filetransfer
++ DESTINATION /opt/tests/dlt-daemon/data
+ )
+diff --git a/src/tests/dlt-test-filetransfer.c b/src/tests/dlt-test-filetransfer.c
+index 14b69e4..589926f 100644
+--- a/src/tests/dlt-test-filetransfer.c
++++ b/src/tests/dlt-test-filetransfer.c
+@@ -362,9 +362,9 @@ int testFile3Run3(){
+ int main(void)
+ {
+ //First file contains some text
+- file1 = "/usr/share/dlt-filetransfer/dlt-test-filetransfer-file";
++ file1 = "/opt/tests/dlt-daemon/data/dlt-test-filetransfer-file";
+ //Second file is a picture
+- file2 = "/usr/share/dlt-filetransfer/dlt-test-filetransfer-image.png";
++ file2 = "/opt/tests/dlt-daemon/data/dlt-test-filetransfer-image.png";
+ //Third file doesn't exist. Just to test the reaction when the file isn't available.
+ file3_1 = "dlt-test-filetransfer-doesntExist_1";
+ //Third file doesn't exist. Just to test the reaction when the file isn't available.
+--
+1.9.1
+
diff --git a/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend b/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend
new file mode 100644
index 0000000..8b50f89
--- /dev/null
+++ b/meta-ivi-test/recipes-extended/dlt-daemon/dlt-daemon_%.bbappend
@@ -0,0 +1,26 @@
+#
+# for test
+#
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+SRC_URI_append += " \
+ file://0001-change-file-position-for-dlt-test-filetransfer.patch \
+ "
+
+EXTRA_OECMAKE += "-DWITH_DLTTEST=ON -DCMAKE_SKIP_RPATH=ON -DWITH_MAN=OFF"
+
+do_install_append() {
+ _BIN=${WORKDIR}/build/src/tests
+ install -d ${D}/opt/tests/${PN}/data
+ install -m 0755 ${_BIN}/dlt-test-* ${D}/opt/tests/${PN}
+}
+
+PACKAGES += "${PN}-test"
+DEPENDS_${PN}-test = "${PN}"
+
+FILES_${PN}-dbg += " \
+ /opt/tests/${PN}/.debug/* \
+ "
+FILES_${PN}-test = " \
+ /opt/tests/${PN}/dlt-test* \
+ /opt/tests/${PN}/data/* \
+ "
diff --git a/meta-ivi/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb b/meta-ivi/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb
index 183e2e9..d6465bd 100644
--- a/meta-ivi/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb
+++ b/meta-ivi/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb
@@ -42,3 +42,7 @@ SYSTEMD_AUTO_ENABLE_${PN}-systemd = "disable"
EXTRA_OECMAKE = "-DWITH_SYSTEMD=ON"
FILES_${PN}-doc += "/usr/share/dlt-filetransfer"
+
+do_install_append() {
+ rm -f ${D}${bindir}/dlt-test-*
+}