summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChi Xu <chi.xu@eng.windriver.com>2023-05-17 09:36:11 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-05-22 10:53:49 +0100
commita0998bf22b5f13ef68c9282e41f18a35b79cc067 (patch)
tree913455a76d4debf5300355c0b4609af1c4591f25 /meta
parentc0e4aa38b2b57b1d65171b982a1a6abefbcd6a1a (diff)
downloadpoky-a0998bf22b5f13ef68c9282e41f18a35b79cc067.tar.gz
expect: Add ptest support
Test results: root@qemux86-64:~# ptest-runner expect START: ptest-runner 2023-05-17T01:25 BEGIN: /usr/lib64/expect/ptest via send_stdout PASS: cat-1.1 PASS: expect-1.1 PASS: expect-1.2 PASS: expect-1.3 PASS: expect-1.4 PASS: expect-1.5 PASS: expect-1.6 PASS: expect-1.7 PASS: expect-1.10 PASS: expect-1.11 PASS: expect-1.12 PASS: expect-1.13 PASS: expect-1.8 PASS: expect-1.8b PASS: expect-1.9 PASS: logfile-1.1 PASS: pid-1.2 PASS: pid-1.3 PASS: pid-1.4 PASS: pid-1.5 PASS: send-1.1 PASS: send-1.2 PASS: spawn-1.1 PASS: spawn-1.2 PASS: spawn-1.3 PASS: spawn-1.4 PASS: spawn-1.5 PASS: stty-1.1 PASS: stty-1.2 DURATION: 17 END: /usr/lib64/expect/ptest 2023-05-17T01:26 STOP: ptest-runner TOTAL: 1 FAIL: 0 (From OE-Core rev: 13711656b1470e9d440bcf83e9fc9dc7ab2292f9) Signed-off-by: Chi Xu <chi.xu@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/conf/distro/include/ptest-packagelists.inc1
-rwxr-xr-xmeta/recipes-devtools/expect/expect/run-ptest6
-rw-r--r--meta/recipes-devtools/expect/expect_5.45.4.bb8
3 files changed, 14 insertions, 1 deletions
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index faa9bd6983..da9153b998 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -17,6 +17,7 @@ PTESTS_FAST = "\
17 diffutils \ 17 diffutils \
18 ethtool \ 18 ethtool \
19 expat \ 19 expat \
20 expect \
20 findutils \ 21 findutils \
21 flex \ 22 flex \
22 gawk \ 23 gawk \
diff --git a/meta/recipes-devtools/expect/expect/run-ptest b/meta/recipes-devtools/expect/expect/run-ptest
new file mode 100755
index 0000000000..856c314eaf
--- /dev/null
+++ b/meta/recipes-devtools/expect/expect/run-ptest
@@ -0,0 +1,6 @@
1#!/bin/sh
2
3out_put=`tclsh tests/all.tcl -verbose bpse`
4echo
5echo "${out_put}" | awk '/PASSED|FAILED|SKIPPED/{gsub(/PASSED/,"PASS"); gsub(/FAILED/,"FAIL"); gsub(/SKIPPED/,"SKIP"); if ($NF=="PASS"){print $NF": "$(NF-1)}else{print $NF": "$2}}' | uniq
6
diff --git a/meta/recipes-devtools/expect/expect_5.45.4.bb b/meta/recipes-devtools/expect/expect_5.45.4.bb
index 6cb46f334c..7b610b1ff2 100644
--- a/meta/recipes-devtools/expect/expect_5.45.4.bb
+++ b/meta/recipes-devtools/expect/expect_5.45.4.bb
@@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
16DEPENDS += "tcl" 16DEPENDS += "tcl"
17RDEPENDS:${PN} = "tcl" 17RDEPENDS:${PN} = "tcl"
18 18
19inherit autotools update-alternatives 19inherit autotools update-alternatives ptest
20 20
21SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \ 21SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
22 file://0001-configure.in.patch \ 22 file://0001-configure.in.patch \
@@ -27,6 +27,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
27 file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \ 27 file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \
28 file://0001-fixline1-fix-line-1.patch \ 28 file://0001-fixline1-fix-line-1.patch \
29 file://0001-Add-prototype-to-function-definitions.patch \ 29 file://0001-Add-prototype-to-function-definitions.patch \
30 file://run-ptest \
30 " 31 "
31SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2" 32SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
32SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34" 33SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34"
@@ -44,6 +45,11 @@ do_install:append() {
44 sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl 45 sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
45} 46}
46 47
48do_install_ptest() {
49 install -d ${D}${PTEST_PATH}
50 cp -r ${S}/tests ${D}${PTEST_PATH}
51}
52
47# Apparently the public Tcl headers are only in /usr/include/tcl8.6 53# Apparently the public Tcl headers are only in /usr/include/tcl8.6
48# when building for the target and nativesdk. 54# when building for the target and nativesdk.
49TCL_INCLUDE_PATH = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6" 55TCL_INCLUDE_PATH = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6"