summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/tcltk
diff options
context:
space:
mode:
authorChong Lu <Chong.Lu@windriver.com>2014-01-08 16:49:56 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-10 15:16:49 +0000
commitd863ae24980d96782a96d2c0f7faafaff951b79a (patch)
treec9c023306a83e2341283c74bb8d1cb3408200789 /meta/recipes-devtools/tcltk
parenta8a711cecce646b3b98346d9676f2ca21d7263e2 (diff)
downloadast2050-yocto-poky-d863ae24980d96782a96d2c0f7faafaff951b79a.zip
ast2050-yocto-poky-d863ae24980d96782a96d2c0f7faafaff951b79a.tar.gz
tcl: enable ptest support
Install tcl test suite and run it as ptest. (From OE-Core rev: 831da5b54cf294ecf90626b14d439bd8e99cb0c2) Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/tcltk')
-rw-r--r--meta/recipes-devtools/tcltk/tcl/run-ptest8
-rw-r--r--meta/recipes-devtools/tcltk/tcl_8.6.1.bb13
2 files changed, 20 insertions, 1 deletions
diff --git a/meta/recipes-devtools/tcltk/tcl/run-ptest b/meta/recipes-devtools/tcltk/tcl/run-ptest
new file mode 100644
index 0000000..a5d6548
--- /dev/null
+++ b/meta/recipes-devtools/tcltk/tcl/run-ptest
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+for i in `ls tests/*.test |awk -F/ '{print $2}'`; \
+ do TCL_LIBRARY=library ./tcltest tests/all.tcl -file $i &>$i.tmp; \
+ grep -q "^Files with failing tests:" $i.tmp; \
+ if [ $? == 0 ]; then echo "FAIL: $i"; \
+ else echo "PASS: $i"; rm -f $i.tmp; fi; \
+done
diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.1.bb b/meta/recipes-devtools/tcltk/tcl_8.6.1.bb
index c5eb205..662261b 100644
--- a/meta/recipes-devtools/tcltk/tcl_8.6.1.bb
+++ b/meta/recipes-devtools/tcltk/tcl_8.6.1.bb
@@ -20,6 +20,7 @@ SRC_URI = "${BASE_SRC_URI} \
file://no_packages.patch \
file://tcl-remove-hardcoded-install-path.patch \
file://alter-includedir.patch \
+ file://run-ptest \
"
SRC_URI[md5sum] = "aae4b701ee527c6e4e1a6f9c7399882e"
SRC_URI[sha256sum] = "16ee769248e64ba1cae6b4834fcc4e4edd7470d881410e8d58f7dd1434343514"
@@ -30,7 +31,7 @@ S = "${WORKDIR}/tcl${PV}/unix"
VER = "8.6.1"
-inherit autotools
+inherit autotools ptest
DEPENDS_class-native = ""
@@ -79,3 +80,13 @@ RDEPENDS_${PN} += "tcl-lib"
RDEPENDS_${PN}_class-native = ""
BBCLASSEXTEND = "native"
+
+do_compile_ptest() {
+ oe_runmake tcltest
+}
+
+do_install_ptest() {
+ cp ${B}/tcltest ${D}${PTEST_PATH}
+ cp -r ${S}/../library ${D}${PTEST_PATH}
+ cp -r ${S}/../tests ${D}${PTEST_PATH}
+}
OpenPOWER on IntegriCloud