diff mbox series

openvpn: change ptest output format

Message ID 20250821072502.4137334-1-jiaying.song.cn@windriver.com
State New
Headers show
Series openvpn: change ptest output format | expand

Commit Message

Song, Jiaying (CN) Aug. 21, 2025, 7:25 a.m. UTC
From: Jiaying Song <jiaying.song.cn@windriver.com>

The format selected is the automake "simple test" format: "result: testname".

Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
---
 .../recipes-support/openvpn/openvpn/run-ptest            | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Gyorgy Sarvari Aug. 21, 2025, 8:59 a.m. UTC | #1
On 8/21/25 09:25, Song, Jiaying (CN) via lists.openembedded.org wrote:
> From: Jiaying Song <jiaying.song.cn@windriver.com>
>
> The format selected is the automake "simple test" format: "result: testname".
>
> Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
> ---
>  .../recipes-support/openvpn/openvpn/run-ptest            | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/meta-networking/recipes-support/openvpn/openvpn/run-ptest b/meta-networking/recipes-support/openvpn/openvpn/run-ptest
> index 5b187d9086..572e969ade 100644
> --- a/meta-networking/recipes-support/openvpn/openvpn/run-ptest
> +++ b/meta-networking/recipes-support/openvpn/openvpn/run-ptest
> @@ -1,5 +1,8 @@
>  #!/bin/sh
> -for x in `find ./ -name Makefile`;
> -do
> -	make -C `dirname ${x}` -k runtest-TESTS
> +
> +find ./ -name Makefile | while read -r x; do
> +    make -C "$(dirname "${x}")" -k runtest-TESTS | sed \
> +        -e 's/^\(\[       OK \].*\)$/PASS: \1/' \
> +        -e 's/^\(\[  FAILED  \].*\)$/FAILED: \1/' \
> +        -e 's/^\(\[  SKIPPED \].*\)$/SKIPPED: \1/'
>  done
>

Just a small note: the ptest logparser expects "FAIL:" and "SKIP:"
prefixes[1] (instead of "FAILED" and "SKIPPED"

[1]:
https://git.yoctoproject.org/poky/tree/meta/lib/oeqa/utils/logparser.py#n20
Song, Jiaying (CN) Aug. 21, 2025, 9:09 a.m. UTC | #2
Hi Gyorgy,

Thank you for the note, and I apologize for the mistake. I have updated the patch and sent v2 with the correct prefixes "FAIL:" and "SKIP:".

Best regards,
Jiaying

-----Original Message-----
From: Gyorgy Sarvari <skandigraun@gmail.com> 
Sent: Thursday, August 21, 2025 5:00 PM
To: Song, Jiaying (CN) <Jiaying.Song.CN@windriver.com>; openembedded-devel@lists.openembedded.org
Subject: Re: [oe] [PATCH] openvpn: change ptest output format

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

On 8/21/25 09:25, Song, Jiaying (CN) via lists.openembedded.org wrote:
> From: Jiaying Song <jiaying.song.cn@windriver.com>
>
> The format selected is the automake "simple test" format: "result: testname".
>
> Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
> ---
>  .../recipes-support/openvpn/openvpn/run-ptest            | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/meta-networking/recipes-support/openvpn/openvpn/run-ptest b/meta-networking/recipes-support/openvpn/openvpn/run-ptest
> index 5b187d9086..572e969ade 100644
> --- a/meta-networking/recipes-support/openvpn/openvpn/run-ptest
> +++ b/meta-networking/recipes-support/openvpn/openvpn/run-ptest
> @@ -1,5 +1,8 @@
>  #!/bin/sh
> -for x in `find ./ -name Makefile`;
> -do
> -     make -C `dirname ${x}` -k runtest-TESTS
> +
> +find ./ -name Makefile | while read -r x; do
> +    make -C "$(dirname "${x}")" -k runtest-TESTS | sed \
> +        -e 's/^\(\[       OK \].*\)$/PASS: \1/' \
> +        -e 's/^\(\[  FAILED  \].*\)$/FAILED: \1/' \
> +        -e 's/^\(\[  SKIPPED \].*\)$/SKIPPED: \1/'
>  done
>

Just a small note: the ptest logparser expects "FAIL:" and "SKIP:"
prefixes[1] (instead of "FAILED" and "SKIPPED"

[1]:
https://git.yoctoproject.org/poky/tree/meta/lib/oeqa/utils/logparser.py#n20
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/openvpn/openvpn/run-ptest b/meta-networking/recipes-support/openvpn/openvpn/run-ptest
index 5b187d9086..572e969ade 100644
--- a/meta-networking/recipes-support/openvpn/openvpn/run-ptest
+++ b/meta-networking/recipes-support/openvpn/openvpn/run-ptest
@@ -1,5 +1,8 @@ 
 #!/bin/sh
-for x in `find ./ -name Makefile`;
-do
-	make -C `dirname ${x}` -k runtest-TESTS
+
+find ./ -name Makefile | while read -r x; do
+    make -C "$(dirname "${x}")" -k runtest-TESTS | sed \
+        -e 's/^\(\[       OK \].*\)$/PASS: \1/' \
+        -e 's/^\(\[  FAILED  \].*\)$/FAILED: \1/' \
+        -e 's/^\(\[  SKIPPED \].*\)$/SKIPPED: \1/'
 done