mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-27 07:57:27 +00:00
libssh2: enhance ptest
support testcase ssh2.sh Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+46
@@ -0,0 +1,46 @@
|
|||||||
|
From f9e3e2ee7b18ba5bb8efe083171f3e701eb0a663 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Your Name <you@example.com>
|
||||||
|
Date: Mon, 28 Dec 2020 02:08:03 +0000
|
||||||
|
Subject: [PATCH] Don't let host enviroment to decide if a test is build
|
||||||
|
|
||||||
|
test ssh2.sh need sshd, for cross compile, we need it on target, so
|
||||||
|
don't use SSHD on host to decide weither to build a test
|
||||||
|
|
||||||
|
Upstream-Status: Inappropriate[oe specific]
|
||||||
|
|
||||||
|
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||||
|
---
|
||||||
|
tests/Makefile.am | 6 +-----
|
||||||
|
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||||
|
index dc0922f..6cbc35d 100644
|
||||||
|
--- a/tests/Makefile.am
|
||||||
|
+++ b/tests/Makefile.am
|
||||||
|
@@ -1,16 +1,12 @@
|
||||||
|
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include -I$(top_builddir)/src
|
||||||
|
LDADD = ../src/libssh2.la
|
||||||
|
|
||||||
|
-if SSHD
|
||||||
|
noinst_PROGRAMS = ssh2
|
||||||
|
ssh2_SOURCES = ssh2.c
|
||||||
|
-endif
|
||||||
|
|
||||||
|
ctests = simple$(EXEEXT)
|
||||||
|
TESTS = $(ctests) mansyntax.sh
|
||||||
|
-if SSHD
|
||||||
|
TESTS += ssh2.sh
|
||||||
|
-endif
|
||||||
|
check_PROGRAMS = $(ctests)
|
||||||
|
|
||||||
|
TESTS_ENVIRONMENT = SSHD=$(SSHD) EXEEXT=$(EXEEXT)
|
||||||
|
@@ -38,4 +34,4 @@ if OPENSSL
|
||||||
|
# EXTRA_DIST += test_public_key_auth_succeeds_with_correct_encrypted_ed25519_key.c
|
||||||
|
# EXTRA_DIST += test_public_key_auth_succeeds_with_correct_ed25519_key_from_mem.c
|
||||||
|
EXTRA_DIST += test_public_key_auth_succeeds_with_correct_rsa_openssh_key.c
|
||||||
|
-endif
|
||||||
|
\ No newline at end of file
|
||||||
|
+endif
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
ptestdir=$(dirname "$(readlink -f "$0")")
|
ptestdir=$(dirname "$(readlink -f "$0")")
|
||||||
cd tests
|
cd tests
|
||||||
for test in $(ls)
|
for test in simple ssh2.sh mansyntax.sh
|
||||||
do
|
do
|
||||||
./../test-driver --test-name $test --log-file ../$test.log --trs-file ../$test.trs --color-tests no --enable-hard-errors yes --expect-failure no -- ./$test
|
./../test-driver --test-name $test --log-file ../$test.log --trs-file ../$test.trs --color-tests no --enable-hard-errors yes --expect-failure no -- ./$test
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \
|
|||||||
file://CVE-2019-17498.patch \
|
file://CVE-2019-17498.patch \
|
||||||
file://run-ptest \
|
file://run-ptest \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
SRC_URI_append_ptest = " file://0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "1beefafe8963982adc84b408b2959927"
|
SRC_URI[md5sum] = "1beefafe8963982adc84b408b2959927"
|
||||||
SRC_URI[sha256sum] = "d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd"
|
SRC_URI[sha256sum] = "d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd"
|
||||||
|
|
||||||
@@ -29,7 +32,7 @@ PACKAGECONFIG[gcrypt] = "--with-crypto=libgcrypt --with-libgcrypt-prefix=${STAGI
|
|||||||
BBCLASSEXTEND = "native nativesdk"
|
BBCLASSEXTEND = "native nativesdk"
|
||||||
|
|
||||||
# required for ptest on documentation
|
# required for ptest on documentation
|
||||||
RDEPENDS_${PN}-ptest = "man-db"
|
RDEPENDS_${PN}-ptest = "man-db openssh"
|
||||||
RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-en-us"
|
RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-en-us"
|
||||||
|
|
||||||
do_compile_ptest() {
|
do_compile_ptest() {
|
||||||
@@ -39,9 +42,11 @@ do_compile_ptest() {
|
|||||||
|
|
||||||
do_install_ptest() {
|
do_install_ptest() {
|
||||||
install -d ${D}${PTEST_PATH}/tests
|
install -d ${D}${PTEST_PATH}/tests
|
||||||
install -m 0755 ${B}/tests/.libs/simple ${D}${PTEST_PATH}/tests/
|
|
||||||
install -m 0755 ${S}/tests/mansyntax.sh ${D}${PTEST_PATH}/tests/
|
|
||||||
install -m 0755 ${S}/test-driver ${D}${PTEST_PATH}/
|
install -m 0755 ${S}/test-driver ${D}${PTEST_PATH}/
|
||||||
|
cp -rf ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests/
|
||||||
|
cp -rf ${S}/tests/mansyntax.sh ${D}${PTEST_PATH}/tests/
|
||||||
|
cp -rf ${S}/tests/ssh2.sh ${D}${PTEST_PATH}/tests/
|
||||||
|
cp -rf ${S}/tests/etc ${D}${PTEST_PATH}/tests/
|
||||||
mkdir -p ${D}${PTEST_PATH}/docs
|
mkdir -p ${D}${PTEST_PATH}/docs
|
||||||
cp -r ${S}/docs/* ${D}${PTEST_PATH}/docs/
|
cp -r ${S}/docs/* ${D}${PTEST_PATH}/docs/
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user