* [PATCH] openssh: skip unit tests to avoid Makefile errors
@ 2020-01-20 16:08 Mingde (Matthew) Zeng
2020-01-20 16:12 ` Alexander Kanavin
0 siblings, 1 reply; 3+ messages in thread
From: Mingde (Matthew) Zeng @ 2020-01-20 16:08 UTC (permalink / raw)
To: openembedded-core
As per do_compile_ptest first appeared in commit 1f7aaf76f4aa7875f05f4b838a5ec4594a4c35dc,
regress/unittests/ binaries are already skipped.
This will trigger a Makefile error when running ptest:
```sh
/bin/sh: line 4: /usr/lib/openssh/ptest/regress/unittests/sshbuf/test_sshbuf: No such file or directory
make: *** [Makefile:243: unit] Error 127
make: Target 'tests' not remade because of errors.
```
openssh/regress/Makefile:
```
tests: prep file-tests t-exec unit
```
Therefore we do not `make tests` as it consists of unit tests, we
`make prep file-tests t-exec` instead.
Signed-off-by: Matthew Zeng<Matthew.Zeng@windriver.com>
---
meta/recipes-connectivity/openssh/openssh/run-ptest | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-connectivity/openssh/openssh/run-ptest b/meta/recipes-connectivity/openssh/openssh/run-ptest
index daf62cca5b..e5270ceade 100755
--- a/meta/recipes-connectivity/openssh/openssh/run-ptest
+++ b/meta/recipes-connectivity/openssh/openssh/run-ptest
@@ -4,7 +4,8 @@ export TEST_SHELL=sh
cd regress
sed -i "/\t\tagent-ptrace /d" Makefile
-make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \
+
+make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" prep file-tests t-exec \
| sed -u -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g'
SSHAGENT=`which ssh-agent`
@@ -41,4 +42,3 @@ EOF
${SSHAGENT} -k > /dev/null
fi
userdel openssh-test
-
--
2.24.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] openssh: skip unit tests to avoid Makefile errors
2020-01-20 16:08 [PATCH] openssh: skip unit tests to avoid Makefile errors Mingde (Matthew) Zeng
@ 2020-01-20 16:12 ` Alexander Kanavin
2020-01-20 18:19 ` Mingde (Matthew) Zeng
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2020-01-20 16:12 UTC (permalink / raw)
To: Mingde (Matthew) Zeng; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 2215 bytes --]
I think I have a better patch for this:
http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=akanavin/package-version-updates&id=c2fc852501414b06e6587d97d3bc944a4650906e
Rather than hardcode upstream-specific targets, my patch uses a variable
that upstream uses to skip the tests.
Alex
On Mon, 20 Jan 2020 at 17:08, Mingde (Matthew) Zeng <
matthew.zeng@windriver.com> wrote:
>
> As per do_compile_ptest first appeared in commit
> 1f7aaf76f4aa7875f05f4b838a5ec4594a4c35dc,
> regress/unittests/ binaries are already skipped.
>
> This will trigger a Makefile error when running ptest:
> ```sh
> /bin/sh: line 4:
> /usr/lib/openssh/ptest/regress/unittests/sshbuf/test_sshbuf: No such file
> or directory
> make: *** [Makefile:243: unit] Error 127
> make: Target 'tests' not remade because of errors.
> ```
>
> openssh/regress/Makefile:
> ```
> tests: prep file-tests t-exec unit
> ```
>
> Therefore we do not `make tests` as it consists of unit tests, we
> `make prep file-tests t-exec` instead.
>
> Signed-off-by: Matthew Zeng<Matthew.Zeng@windriver.com>
>
> ---
> meta/recipes-connectivity/openssh/openssh/run-ptest | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-connectivity/openssh/openssh/run-ptest
> b/meta/recipes-connectivity/openssh/openssh/run-ptest
> index daf62cca5b..e5270ceade 100755
> --- a/meta/recipes-connectivity/openssh/openssh/run-ptest
> +++ b/meta/recipes-connectivity/openssh/openssh/run-ptest
> @@ -4,7 +4,8 @@ export TEST_SHELL=sh
>
> cd regress
> sed -i "/\t\tagent-ptrace /d" Makefile
> -make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \
> +
> +make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" prep file-tests t-exec \
> | sed -u -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e
> 's/^failed/FAIL: /g'
>
> SSHAGENT=`which ssh-agent`
> @@ -41,4 +42,3 @@ EOF
> ${SSHAGENT} -k > /dev/null
> fi
> userdel openssh-test
> -
> --
> 2.24.0
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 3161 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] openssh: skip unit tests to avoid Makefile errors
2020-01-20 16:12 ` Alexander Kanavin
@ 2020-01-20 18:19 ` Mingde (Matthew) Zeng
0 siblings, 0 replies; 3+ messages in thread
From: Mingde (Matthew) Zeng @ 2020-01-20 18:19 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: OE-core
> I think I have a better patch for this:
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=akanavin/package-version-updates&id=c2fc852501414b06e6587d97d3bc944a4650906e
>
> Rather than hardcode upstream-specific targets, my patch uses a variable that upstream uses to skip the tests.
Sounds good, your patch should be merged instead. I do not see that there is already a patch available.
Matthew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-20 18:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20 16:08 [PATCH] openssh: skip unit tests to avoid Makefile errors Mingde (Matthew) Zeng
2020-01-20 16:12 ` Alexander Kanavin
2020-01-20 18:19 ` Mingde (Matthew) Zeng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.