diff options
| author | Chi Xu <chi.xu@windriver.com> | 2023-05-23 13:26:11 +0800 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-05-31 04:08:11 -1000 |
| commit | eeff6b4ec82662ca2ceb8a4b58e7a94bef25851d (patch) | |
| tree | 80e6f945ca0212619de95b549a57cb6513c9254c | |
| parent | 30417b870d35776b902b03c676b268d821575119 (diff) | |
| download | poky-eeff6b4ec82662ca2ceb8a4b58e7a94bef25851d.tar.gz | |
expect: Add ptest support
Test results:
root@qemux86-64:~# ptest-runner expect
START: ptest-runner
2023-05-23T05:17
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-23T05:17
STOP: ptest-runner
TOTAL: 1 FAIL: 0
(From OE-Core rev: e145ddefac0cb65072797c13f6067670d4631bfb)
Signed-off-by: Chi Xu <chi.xu@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
| -rw-r--r-- | meta/conf/distro/include/ptest-packagelists.inc | 1 | ||||
| -rwxr-xr-x | meta/recipes-devtools/expect/expect/run-ptest | 6 | ||||
| -rw-r--r-- | meta/recipes-devtools/expect/expect_5.45.4.bb | 8 |
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 d60ebb38fc..003348906a 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 | |||
| 3 | out_put=`tclsh tests/all.tcl -verbose bpse` | ||
| 4 | echo | ||
| 5 | 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 | ||
| 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" | |||
| 16 | DEPENDS += "tcl" | 16 | DEPENDS += "tcl" |
| 17 | RDEPENDS:${PN} = "tcl" | 17 | RDEPENDS:${PN} = "tcl" |
| 18 | 18 | ||
| 19 | inherit autotools update-alternatives | 19 | inherit autotools update-alternatives ptest |
| 20 | 20 | ||
| 21 | SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \ | 21 | SRC_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 | " |
| 31 | SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2" | 32 | SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2" |
| 32 | SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34" | 33 | SRC_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 | ||
| 48 | do_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. |
| 49 | TCL_INCLUDE_PATH = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6" | 55 | TCL_INCLUDE_PATH = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6" |
