All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCHv3 1/1] lua: Added ptest for lua
@ 2016-02-03  9:25 Paul Vaduva
  0 siblings, 0 replies; only message in thread
From: Paul Vaduva @ 2016-02-03  9:25 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Andreas Sundstr
Signed-off-by: Maxin B. John <maxin.john@enea.com>
Signed-off-by: Paul Vaduva <Paul.Vaduva@enea.com>
---
 meta-oe/recipes-devtools/lua/lua/run-ptest | 19 +++++++++++++++++++
 meta-oe/recipes-devtools/lua/lua_5.3.2.bb  | 20 +++++++++++++++-----
 2 files changed, 34 insertions(+), 5 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/lua/lua/run-ptest

diff --git a/meta-oe/recipes-devtools/lua/lua/run-ptest b/meta-oe/recipes-devtools/lua/lua/run-ptest
new file mode 100644
index 0000000..8e085e1
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua/run-ptest
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+cd test
+lua -e"_U=true" all.lua > lua-test.tmp
+
+echo "--- test output ---"
+cat lua-test.tmp
+echo ""
+echo ""
+echo "--- ptest result ---"
+
+grep "final OK \!\!\!" lua-test.tmp > /dev/null
+if [ $? -eq 0 ]; then
+   echo "PASS: lua"
+else
+   echo "FAIL: lua"
+fi
+
+rm -f lua-test.tmp
diff --git a/meta-oe/recipes-devtools/lua/lua_5.3.2.bb b/meta-oe/recipes-devtools/lua/lua_5.3.2.bb
index 3fe8c3f..0cc882d 100644
--- a/meta-oe/recipes-devtools/lua/lua_5.3.2.bb
+++ b/meta-oe/recipes-devtools/lua/lua_5.3.2.bb
@@ -7,14 +7,20 @@ HOMEPAGE = "http://www.lua.org/"
 PR = "r0"
 
 DEPENDS = "readline"
-SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \
+SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
            file://lua.pc \
-"
+           "
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', \
+           'http://www.lua.org/tests/lua-${PV}-tests.tar.gz;name=tarballtest \
+            file://run-ptest \
+           ', '', d)}"
 
-SRC_URI[md5sum] = "33278c2ab5ee3c1a875be8d55c1ca2a1"
-SRC_URI[sha256sum] = "c740c7bb23a936944e1cc63b7c3c5351a8976d7867c5252c8854f7b2af9da68f"
+SRC_URI[tarballsrc.md5sum] = "33278c2ab5ee3c1a875be8d55c1ca2a1"
+SRC_URI[tarballsrc.sha256sum] = "c740c7bb23a936944e1cc63b7c3c5351a8976d7867c5252c8854f7b2af9da68f"
+SRC_URI[tarballtest.md5sum] = "a2b7ab1b8ff82a0145376e233ef30a4a"
+SRC_URI[tarballtest.sha256sum] = "56909863a3713dee3709b3dbd0c868237e4f5c9ea1744f5bf0ba8bafa6c4ed32"
 
-inherit pkgconfig binconfig
+inherit pkgconfig binconfig ptest
 
 UCLIBC_PATCHES += "file://uclibc-pthread.patch"
 SRC_URI_append_libc-uclibc = "${UCLIBC_PATCHES}"
@@ -46,4 +52,8 @@ do_install () {
     rmdir ${D}${datadir}/lua
 }
 
+do_install_ptest () {
+        cp -a ${WORKDIR}/lua-${PV}-tests ${D}${PTEST_PATH}/test
+}
+
 BBCLASSEXTEND = "native"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-03  9:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03  9:25 [meta-oe][PATCHv3 1/1] lua: Added ptest for lua Paul Vaduva

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.