Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] insserv: enable ptest support
@ 2014-02-20 10:55 Chong Lu
  2014-02-20 10:55 ` [PATCH 1/1] " Chong Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Chong Lu @ 2014-02-20 10:55 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 54562006c1327c5b99daa4cc05a3ba7e38412da1:

  image_types.bbclass: Fix tar IMAGE_CMD to not change directories (2014-02-18 08:38:52 +0000)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib chonglu/insserv
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=chonglu/insserv

Chong Lu (1):
  insserv: enable ptest support

 meta/recipes-devtools/insserv/files/run-ptest   | 17 +++++++++++++++++
 meta/recipes-devtools/insserv/insserv_1.14.0.bb | 14 +++++++++++++-
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/insserv/files/run-ptest

-- 
1.8.1.2



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] insserv: enable ptest support
  2014-02-20 10:55 [PATCH 0/1] insserv: enable ptest support Chong Lu
@ 2014-02-20 10:55 ` Chong Lu
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Lu @ 2014-02-20 10:55 UTC (permalink / raw)
  To: openembedded-core

Install insserv test suite and run it as ptest.

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
---
 meta/recipes-devtools/insserv/files/run-ptest   | 17 +++++++++++++++++
 meta/recipes-devtools/insserv/insserv_1.14.0.bb | 14 +++++++++++++-
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/insserv/files/run-ptest

diff --git a/meta/recipes-devtools/insserv/files/run-ptest b/meta/recipes-devtools/insserv/files/run-ptest
new file mode 100644
index 0000000..495d155
--- /dev/null
+++ b/meta/recipes-devtools/insserv/files/run-ptest
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+basedir=$(dirname $0)
+. $basedir/common
+
+output() {
+  if [ $? -eq 0 ]; \
+    then echo "PASS: $i"; \
+    else echo "FAIL: $i"; \
+  fi;
+}
+
+for i in test_simple_sequence test_undetected_loop; \
+  do $i &>/dev/null ; output; \
+done
+
+rm -rf ${tmpdir}
diff --git a/meta/recipes-devtools/insserv/insserv_1.14.0.bb b/meta/recipes-devtools/insserv/insserv_1.14.0.bb
index 1d1f59d..4a33e16 100644
--- a/meta/recipes-devtools/insserv/insserv_1.14.0.bb
+++ b/meta/recipes-devtools/insserv/insserv_1.14.0.bb
@@ -11,7 +11,9 @@ PR = "r1"
 SRC_URI = "ftp://ftp.suse.com/pub/projects/init/${BPN}-${PV}.tar.bz2 \
            file://makefile.patch \
            file://disable_runtests.patch \
-           file://insserv.conf"
+           file://insserv.conf \
+           file://run-ptest \
+"
 
 SRC_URI[md5sum] = "4a97d900855148842b1aa8f33b988b47"
 SRC_URI[sha256sum] = "89a0a093b1cf3d802ad40568e64b496b493f51ff9825905c8bd12738b374ca47"
@@ -27,3 +29,13 @@ do_install_class-native () {
 }
 
 BBCLASSEXTEND = "native"
+
+inherit ptest
+
+do_install_ptest() {
+	for i in common suite; do cp ${S}/tests/$i ${D}${PTEST_PATH}; done
+	sed -e 's|${\PWD}/insserv|insserv|;/trap/d' -i ${D}${PTEST_PATH}/suite
+	sed -e '/test_simple_sequence$/d;/test_undetected_loop$/d' -i ${D}${PTEST_PATH}/common
+}
+
+RDEPENDS_${PN}-ptest += "bash"
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-20 10:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-20 10:55 [PATCH 0/1] insserv: enable ptest support Chong Lu
2014-02-20 10:55 ` [PATCH 1/1] " Chong Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox