Skip to contentSkip to conversation

openssh: skip unit tests to avoid Makefile errors

PATCH In review Mingde (Matthew) Zeng 2 participants 3 messages Jan 20, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openssh: skip unit tests to avoid Makefile errors

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.

---
 meta/recipes-connectivity/openssh/openssh/run-ptest | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-connectivity/openssh/openssh/run-ptest +2 -2
index daf62cca5b..e5270ceade 100755
@@ -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

#1 lore raw

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

Quoted 57 lines · Mingde (Matthew) Zeng

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.

---
 meta/recipes-connectivity/openssh/openssh/run-ptest | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-connectivity/openssh/openssh/run-ptest +2 -1
index daf62cca5b..e5270ceade 100755
@@ -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

meta/recipes-connectivity/openssh/openssh/run-ptest +0 -2
@@ -41,4 +42,3 @@ EOF
        ${SSHAGENT} -k > /dev/null
 fi
 userdel openssh-test
-
--

2.24.0
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core