From a0998bf22b5f13ef68c9282e41f18a35b79cc067 Mon Sep 17 00:00:00 2001 From: Chi Xu Date: Wed, 17 May 2023 09:36:11 +0800 Subject: 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 Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/recipes-devtools/expect/expect/run-ptest | 6 ++++++ meta/recipes-devtools/expect/expect_5.45.4.bb | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 meta/recipes-devtools/expect/expect/run-ptest (limited to 'meta/recipes-devtools/expect') 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 @@ +#!/bin/sh + +out_put=`tclsh tests/all.tcl -verbose bpse` +echo +echo "${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 + 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" DEPENDS += "tcl" RDEPENDS:${PN} = "tcl" -inherit autotools update-alternatives +inherit autotools update-alternatives ptest SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \ file://0001-configure.in.patch \ @@ -27,6 +27,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \ file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \ file://0001-fixline1-fix-line-1.patch \ file://0001-Add-prototype-to-function-definitions.patch \ + file://run-ptest \ " SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2" SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34" @@ -44,6 +45,11 @@ do_install:append() { sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl } +do_install_ptest() { + install -d ${D}${PTEST_PATH} + cp -r ${S}/tests ${D}${PTEST_PATH} +} + # Apparently the public Tcl headers are only in /usr/include/tcl8.6 # when building for the target and nativesdk. TCL_INCLUDE_PATH = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6" -- cgit v1.2.3-54-g00ecf