]> code.ossystems Code Review - openembedded-core.git/commitdiff
openssh/util-linux/python*: Ensure ptest output is unbuffered
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 4 Apr 2019 21:33:18 +0000 (22:33 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 9 Apr 2019 12:44:32 +0000 (13:44 +0100)
We need to run sed with the -u option to ensure the output is unbuffered else
ptest-runner may timeout thinkig things were idle. Busybox doesn't have the -u
option so we need to RDEPEND on sed (which is a good thing to do if we use it
anyway).

Alex Kanavin should get credit for discovering the problem.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/openssh/openssh/run-ptest
meta/recipes-connectivity/openssh/openssh_7.9p1.bb
meta/recipes-core/util-linux/util-linux.inc
meta/recipes-core/util-linux/util-linux/run-ptest
meta/recipes-devtools/python/python/run-ptest
meta/recipes-devtools/python/python3/run-ptest
meta/recipes-devtools/python/python3_3.7.2.bb
meta/recipes-devtools/python/python_2.7.15.bb

index 36a3d2a7b7bdb3c3555f9330341f8e06337afc09..daf62cca5b1efc2a6a13bc413e14c25b8aed7b82 100755 (executable)
@@ -5,7 +5,7 @@ export TEST_SHELL=sh
 cd regress
 sed -i "/\t\tagent-ptrace /d" Makefile
 make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \
-        | sed -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g'
+        | sed -u -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g'
 
 SSHAGENT=`which ssh-agent`
 GDB=`which gdb`
index 2a23f64b894ecdbdddd6c42dbda663cca585dc22..6260135d5b23c0a5f3ec734910560765dc9e56b2 100644 (file)
@@ -144,7 +144,7 @@ FILES_${PN}-keygen = "${bindir}/ssh-keygen"
 
 RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
 RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
-RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
+RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make sed"
 
 RPROVIDES_${PN}-ssh = "ssh"
 RPROVIDES_${PN}-sshd = "sshd"
index 18c3af240eb70cc65e375426df7fa30f66a6705b..c7ba8c446f1640dbdaf28349abb272cc9289f635 100644 (file)
@@ -142,7 +142,7 @@ RDEPENDS_${PN}_class-nativesdk = ""
 RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
 
 RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
-RDEPENDS_${PN}-ptest = "bash grep coreutils which btrfs-tools ${PN}"
+RDEPENDS_${PN}-ptest = "bash grep coreutils which btrfs-tools ${PN} sed"
 RDEPENDS_${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff"
 ALLOW_EMPTY_${PN}-swaponoff = "1"
 
index fbc2f9b56a9dfaf8ce283643dbbcf01f7987f42d..8c57bd20740f3ee535f585ae7fbabbc91188e05f 100644 (file)
@@ -16,7 +16,7 @@ res=0
 count=0
 for ts in $comps; 
 do 
-   $ts | sed '{        
+   $ts | sed -u '{        
       s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/                              
       s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/                
       s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/               
index 13dfc99efd5a2a77719719a784960b44e2f02590..c7002a4560c15b662e5b39ab93329f6951a784d7 100644 (file)
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-python -mtest -W | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
+python -mtest -W | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
index 20c9274dfa7799d81313e354a46ab4efed4257ae..50f92916eb6665ce5ea9241745dfcfc5e492bb45 100644 (file)
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-python3 -m test -W | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
+python3 -m test -W | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
index 5c64bc8aa2ae9e5e20056d4be3e9850069862a65..28f128d488baea6a7392cac25ea4672e6b9fa355 100644 (file)
@@ -284,7 +284,7 @@ FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MA
 PACKAGES += "${PN}-man"
 FILES_${PN}-man = "${datadir}/man"
 
-RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2 libgcc tzdata-europe coreutils"
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2 libgcc tzdata-europe coreutils sed"
 RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk', '', d)}"
 RDEPENDS_${PN}-dev = ""
 
index c459af06f10adc6f8f260e939146c11314146280..62051a227b8a7251819619383e3cf26b1aa0c8dc 100644 (file)
@@ -176,7 +176,7 @@ FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
 RDEPENDS_${PN}-modules += "${PN}-misc"
 
 # ptest
-RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip tzdata-europe coreutils"
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip tzdata-europe coreutils sed"
 RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk', '', d)}"
 # catch manpage
 PACKAGES += "${PN}-man"