[oe-commits] [meta-openembedded] 27/28: lua: Added ptest for lua

git at git.openembedded.org git at git.openembedded.org
Mon Feb 1 15:09:12 UTC 2016


martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit 4e10b37dd249caa4f56de2e6002b6ecdf010b9e4
Author: Paul Vaduva <Paul.Vaduva at enea.com>
AuthorDate: Fri Jan 29 13:50:09 2016 +0100

    lua: Added ptest for lua
    
    This was added using a special recipe (lua-test_5.3.2.bb) so that we will
    not download the Lua test suites when not building with ptest.
    
    Signed-off-by: Andreas Sundstr
    Signed-off-by: Maxin B. John <maxin.john at enea.com>
    Signed-off-by: Paul Vaduva <Paul.Vaduva at enea.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 meta-oe/recipes-devtools/lua/lua-test/run-ptest | 19 +++++++++++++++++++
 meta-oe/recipes-devtools/lua/lua-test_5.3.2.bb  | 22 ++++++++++++++++++++++
 meta-oe/recipes-devtools/lua/lua_5.3.2.bb       |  3 +++
 3 files changed, 44 insertions(+)

diff --git a/meta-oe/recipes-devtools/lua/lua-test/run-ptest b/meta-oe/recipes-devtools/lua/lua-test/run-ptest
new file mode 100644
index 0000000..8e085e1
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua-test/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-test_5.3.2.bb b/meta-oe/recipes-devtools/lua/lua-test_5.3.2.bb
new file mode 100644
index 0000000..877df8e
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua-test_5.3.2.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "Lua test suites"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+HOMEPAGE = "http://www.lua.org/"
+
+DEPENDS = "lua"
+SRC_URI = "http://www.lua.org/tests/lua-${PV}-tests.tar.gz \
+           file://lua-test.patch \
+           file://run-ptest \
+"
+
+S = "${WORKDIR}/lua-${PV}-tests"
+
+SRC_URI[md5sum] = "a3dabd30e5a364c87191b0c1e6f64178"
+SRC_URI[sha256sum] = "07c1071c66d9cb4dc80200ed430fc21ebbbccf1f55148b87eb0b9522932e4eb6"
+
+inherit ptest
+
+do_install_ptest () {
+    cp -a ${S} ${D}${PTEST_PATH}/test
+}
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..4ee3b1a 100644
--- a/meta-oe/recipes-devtools/lua/lua_5.3.2.bb
+++ b/meta-oe/recipes-devtools/lua/lua_5.3.2.bb
@@ -7,6 +7,9 @@ HOMEPAGE = "http://www.lua.org/"
 PR = "r0"
 
 DEPENDS = "readline"
+PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
+ALLOW_EMPTY_lua-ptest = "1"
+RDEPENDS_lua-ptest_class-target = "lua-test-ptest"
 SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \
            file://lua.pc \
 "

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list