lighttpd: added ptest
PATCH 1/1 lighttpd: added ptest
Reused lighttpd internal tests and did minimal patching to fix paths.
Upstream-Status: Pending
--- ...-use-standard-sbin-and-lib-path-for-ptest.patch | 37 ++++++++++++ meta/recipes-extended/lighttpd/lighttpd/run-ptest | 4 ++ meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb | 66 +++++++++++++++++++++- 3 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/lighttpd/lighttpd/0002-use-standard-sbin-and-lib-path-for-ptest.patch create mode 100644 meta/recipes-extended/lighttpd/lighttpd/run-ptest
meta/recipes-extended/lighttpd/lighttpd/0002-use-standard-sbin-and-lib-path-for-ptest.patch new file +37 -0
@@ -0,0 +1,37 @@ +lighttpd-ptest: use standard installation path + +ptest should do testing against installed library or executable +at standard installation path, hence using standard installation +path for MODULES_PATH and LIGHTTPD_PATH variables. + +Upsteam-Status: Pending + +Signed-off-by: Aditya Tayade <[email protected]> + +diff --git a/tests/LightyTest.pm b/tests/LightyTest.pm +index 74caea1..2de02d0 100644 +--- a/tests/LightyTest.pm ++++ b/tests/LightyTest.pm +@@ -65,19 +65,10 @@ sub new { + $lpath = (defined $ENV{'srcdir'} ? $ENV{'srcdir'} : '.'); + $self->{SRCDIR} = abs_path($lpath); + ++$self->{SBINDIR} = '/usr/sbin'; ++$self->{MODULES_PATH} = '/usr/lib'; + +-if (mtime($self->{BASEDIR}.'/src/lighttpd') > mtime($self->{BASEDIR}.'/build/lighttpd')) { +-$self->{BINDIR} = $self->{BASEDIR}.'/src'; +-if (mtime($self->{BASEDIR}.'/src/.libs')) { +-$self->{MODULES_PATH} = $self->{BASEDIR}.'/src/.libs'; +-} else { +-$self->{MODULES_PATH} = $self->{BASEDIR}.'/src'; +-} +-} else { +-$self->{BINDIR} = $self->{BASEDIR}.'/build'; +-$self->{MODULES_PATH} = $self->{BASEDIR}.'/build'; +-} +-$self->{LIGHTTPD_PATH} = $self->{BINDIR}.'/lighttpd'; ++$self->{LIGHTTPD_PATH} = $self->{SBINDIR}.'/lighttpd'; + $self->{PORT} = 2048; + + my ($name, $aliases, $addrtype, $net) = gethostbyaddr(inet_aton("127.0.0.1"), AF_INET);
meta/recipes-extended/lighttpd/lighttpd/run-ptest new file +4 -0
@@ -0,0 +1,4 @@ +#!/bin/bash + +make -C tests -k check-TESTS +make -C src -k runtest-TESTS
meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb +65 -1
90 lines not on this page · raw message
--
2.7.4
This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.
Thanks, this should be sent to openembedded-core mailing list.
Alex
Quoted 175 lines · Aditya Tayade
Reused lighttpd internal tests and did minimal patching to fix paths.
Upstream-Status: Pending
Signed-off-by Aditya Tayade <[email protected]>---
...-use-standard-sbin-and-lib-path-for-ptest.patch | 37 ++++++++++++ meta/recipes-extended/lighttpd/lighttpd/run-ptest | 4 ++ meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb | 66 +++++++++++++++++++++- 3 files changed, 106 insertions(+), 1 deletion(-)create mode 100644
meta/recipes-extended/lighttpd/lighttpd/0002-use-standard-sbin-and-lib-path-for-ptest.patchcreate mode 100644 meta/recipes-extended/lighttpd/lighttpd/run-ptestmeta/recipes-extended/lighttpd/lighttpd/0002-use-standard-sbin-and-lib-path-for-ptest.patch new file +37
-0@@ -0,0 +1,37 @@ +lighttpd-ptest: use standard installation path + +ptest should do testing against installed library or executable +at standard installation path, hence using standard installation +path for MODULES_PATH and LIGHTTPD_PATH variables. + +Upsteam-Status: Pending + +Signed-off-by: Aditya Tayade <[email protected]> + +diff --git a/tests/LightyTest.pm b/tests/LightyTest.pm +index 74caea1..2de02d0 100644 +--- a/tests/LightyTest.pm ++++ b/tests/LightyTest.pm +@@ -65,19 +65,10 @@ sub new { + $lpath = (defined $ENV{'srcdir'} ? $ENV{'srcdir'} : '.'); + $self->{SRCDIR} = abs_path($lpath); + ++$self->{SBINDIR} = '/usr/sbin'; ++$self->{MODULES_PATH} = '/usr/lib'; + +-if (mtime($self->{BASEDIR}.'/src/lighttpd') > mtime($self->{BASEDIR}.'/build/lighttpd')) { +-$self->{BINDIR} = $self->{BASEDIR}.'/src'; +-if (mtime($self->{BASEDIR}.'/src/.libs')) { +-$self->{MODULES_PATH} = $self->{BASEDIR}.'/src/.libs'; +-} else { +-$self->{MODULES_PATH} = $self->{BASEDIR}.'/src'; +-} +-} else { +-$self->{BINDIR} = $self->{BASEDIR}.'/build'; +-$self->{MODULES_PATH} = $self->{BASEDIR}.'/build'; +-} +-$self->{LIGHTTPD_PATH} = $self->{BINDIR}.'/lighttpd'; ++$self->{LIGHTTPD_PATH} = $self->{SBINDIR}.'/lighttpd'; + $self->{PORT} = 2048; + + my ($name, $aliases, $addrtype, $net) = gethostbyaddr(inet_aton("127.0.0.1"), AF_INET);meta/recipes-extended/lighttpd/lighttpd/run-ptest new file +4
-0@@ -0,0 +1,4 @@ +#!/bin/bash + +make -C tests -k check-TESTS +make -C src -k runtest-TESTSmeta/recipes-extended/lighttpd/lighttpd_1.4.48.bb +38
-0@@ -9,6 +9,42 @@ SECTION = "net" RDEPENDS_${PN} = "lighttpd-module-dirlisting \ lighttpd-module-indexfile \ lighttpd-module-staticfile" + +RDEPENDS_${PN}-ptest += "bash \ + ${PN} \ + ${PN}-module-compress \ + ${PN}-module-simple-vhost \ + ${PN}-module-rewrite \ + ${PN}-module-cgi \ + ${PN}-module-evhost \ + ${PN}-module-redirect \ + ${PN}-module-fastcgi \ + ${PN}-module-setenv \ + ${PN}-module-extforward \ + ${PN}-module-secdownload \ + ${PN}-module-auth \ + ${PN}-module-authn-file \ + ${PN}-module-status \ + ${PN}-module-expire \ + ${PN}-module-userdir \ + ${PN}-module-ssi \ + ${PN}-module-proxy \ + perl-module-tap-base \ + perl-module-tap-parser-sourcehandler-executable \ + perl-module-tap-formatter-file \ + perl-module-tap-formatter-file-session \ + perl-module-tap-formatter-base \ + perl-module-tap-formatter-session \ + perl-module-tap-formatter-console-session \ + perl-module-tap-parser-scheduler \ + perl-module-tap-parser \ + perl-module-io-socket \ + perl-module-test-more \ + perl-module-test-harness \ + perl-module-tap-object \ + perl-module-tap-formatter-console \ + " + RRECOMMENDS_${PN} = "lighttpd-module-access \ lighttpd-module-accesslog"@@ -18,6 +54,8 @@ SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.t file://lighttpd \ file://lighttpd.service \ file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \ + file://run-ptest \ + file://0002-use-standard-sbin-and-lib-path-for-ptest.patch \ "SRC_URI[md5sum] = "
1e3a9eb5078f481e3a8a1d0aaac8c3c8"meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb +0
-0@@ -49,7 +87,7 @@ PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua5.1"
EXTRA_OECONF+= "--enable-lfs"meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb +1
-1-inherit autotools pkgconfig update-rc.d gettext systemd +inherit autotools pkgconfig update-rc.d gettext systemd ptest
INITSCRIPT_NAME= "lighttpd"INITSCRIPT_PARAMS= "defaults 70"meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb +0
-0@@ -73,6 +111,32 @@ do_install_append() {ln -sf ${localstatedir}/tmp ${D}/www/var
}meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb +26
-0+do_install_ptest() { + t="${D}${PTEST_PATH}" + for i in tests src + do + cp -r "${S}/${i}" "${t}" + cp -r "${B}/${i}"/* "${t}/${i}" + rm -rf "${t}/${i}"/*.lo "${t}/${i}"/*.la "${t}/${i}"/*.c "${t}/${i}"/*.o "${t}/${i}"/*.h + done + + install -D "${B}/${TARGET_PREFIX}libtool" "${t}/${TARGET_PREFIX}libtool" + + # Remove build host references... + find "${t}" -name "Makefile" | xargs \ + sed -i -e "s/^srcdir = \(.*\)/srcdir = ./" \ + -e "s/^Makefile/_Makefile/" \ + -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ + -e "s/^abs_builddir = \(.*\)/abs_builddir = ./" \ + -e "s/^abs_srcdir = \(.*\)/abs_srcdir = ./" \ + -e "s/^top_srcdir = \(.*\)/abs_srcdir = ../" \ + -e "s,${TARGET_PREFIX}gcc,gcc,g" \ + -e "s/^abs_top_srcdir = \(.*\)/abs_top_srcdir = ./" \ + -e "s,${S},,g" \ + -e "s,${B},,g" \ + -e "s,${STAGING_DIR_NATIVE},,g" +} +FILES_${PN} += "${sysconfdir} /www"
CONFFILES_${PN} = "
${sysconfdir}/lighttpd.conf"
--
2.7.4This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.
Signature · 4 lines
_______________________________________________ poky mailing list [email protected] https://lists.yoctoproject.org/listinfo/poky
A message that is not in the archive (sent off-list or not yet received): BMXPR01MB0854C651AA2C55AD8A6C221B91700@BMXPR01MB0854.INDPRD01.PROD.OUTLOOK.COM
I think you need to actually re-send the patch there, not add the list in a reply.
Alex
Quoted 198 lines · Aditya Tayade
Added correct mailing list.
Thaks Alexander!!
Regards,
Aditya Tayade________________________________
From: Alexander Kanavin <[email protected]>
Sent: Sunday, March 3, 2019 7:26:37 PM
To: Aditya Tayade
Cc: [email protected]
Subject: Re: [poky] [meta][sumo][PATCH] lighttpd: added ptestThanks, this should be sent to openembedded-core mailing list.
Alex
Quoted 169 lines · Aditya Tayade
Reused lighttpd internal tests and did minimal patching to fix paths.
Upstream-Status: Pending
Signed-off-by Aditya Tayade <[email protected]>---
...-use-standard-sbin-and-lib-path-for-ptest.patch | 37 ++++++++++++ meta/recipes-extended/lighttpd/lighttpd/run-ptest | 4 ++ meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb | 66 +++++++++++++++++++++- 3 files changed, 106 insertions(+), 1 deletion(-)create mode 100644
meta/recipes-extended/lighttpd/lighttpd/0002-use-standard-sbin-and-lib-path-for-ptest.patchcreate mode 100644 meta/recipes-extended/lighttpd/lighttpd/run-ptestmeta/recipes-extended/lighttpd/lighttpd/0002-use-standard-sbin-and-lib-path-for-ptest.patch new file +37
-0@@ -0,0 +1,37 @@ +lighttpd-ptest: use standard installation path + +ptest should do testing against installed library or executable +at standard installation path, hence using standard installation +path for MODULES_PATH and LIGHTTPD_PATH variables. + +Upsteam-Status: Pending + +Signed-off-by: Aditya Tayade <[email protected]> + +diff --git a/tests/LightyTest.pm b/tests/LightyTest.pm +index 74caea1..2de02d0 100644 +--- a/tests/LightyTest.pm ++++ b/tests/LightyTest.pm +@@ -65,19 +65,10 @@ sub new { + $lpath = (defined $ENV{'srcdir'} ? $ENV{'srcdir'} : '.'); + $self->{SRCDIR} = abs_path($lpath); + ++$self->{SBINDIR} = '/usr/sbin'; ++$self->{MODULES_PATH} = '/usr/lib'; + +-if (mtime($self->{BASEDIR}.'/src/lighttpd') > mtime($self->{BASEDIR}.'/build/lighttpd')) { +-$self->{BINDIR} = $self->{BASEDIR}.'/src'; +-if (mtime($self->{BASEDIR}.'/src/.libs')) { +-$self->{MODULES_PATH} = $self->{BASEDIR}.'/src/.libs'; +-} else { +-$self->{MODULES_PATH} = $self->{BASEDIR}.'/src'; +-} +-} else { +-$self->{BINDIR} = $self->{BASEDIR}.'/build'; +-$self->{MODULES_PATH} = $self->{BASEDIR}.'/build'; +-} +-$self->{LIGHTTPD_PATH} = $self->{BINDIR}.'/lighttpd'; ++$self->{LIGHTTPD_PATH} = $self->{SBINDIR}.'/lighttpd'; + $self->{PORT} = 2048; + + my ($name, $aliases, $addrtype, $net) = gethostbyaddr(inet_aton("127.0.0.1"), AF_INET);meta/recipes-extended/lighttpd/lighttpd/run-ptest new file +4
-0@@ -0,0 +1,4 @@ +#!/bin/bash + +make -C tests -k check-TESTS +make -C src -k runtest-TESTSmeta/recipes-extended/lighttpd/lighttpd_1.4.48.bb +38
-0@@ -9,6 +9,42 @@ SECTION = "net" RDEPENDS_${PN} = "lighttpd-module-dirlisting \ lighttpd-module-indexfile \ lighttpd-module-staticfile" + +RDEPENDS_${PN}-ptest += "bash \ + ${PN} \ + ${PN}-module-compress \ + ${PN}-module-simple-vhost \ + ${PN}-module-rewrite \ + ${PN}-module-cgi \ + ${PN}-module-evhost \ + ${PN}-module-redirect \ + ${PN}-module-fastcgi \ + ${PN}-module-setenv \ + ${PN}-module-extforward \ + ${PN}-module-secdownload \ + ${PN}-module-auth \ + ${PN}-module-authn-file \ + ${PN}-module-status \ + ${PN}-module-expire \ + ${PN}-module-userdir \ + ${PN}-module-ssi \ + ${PN}-module-proxy \ + perl-module-tap-base \ + perl-module-tap-parser-sourcehandler-executable \ + perl-module-tap-formatter-file \ + perl-module-tap-formatter-file-session \ + perl-module-tap-formatter-base \ + perl-module-tap-formatter-session \ + perl-module-tap-formatter-console-session \ + perl-module-tap-parser-scheduler \ + perl-module-tap-parser \ + perl-module-io-socket \ + perl-module-test-more \ + perl-module-test-harness \ + perl-module-tap-object \ + perl-module-tap-formatter-console \ + " + RRECOMMENDS_${PN} = "lighttpd-module-access \ lighttpd-module-accesslog"@@ -18,6 +54,8 @@ SRC_URI = "https://apac01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdownload.lighttpd.net%2Flighttpd%2Freleases-1.4.x%2Flighttpd-%24&data=02%7C01%7CAditya.Tayade%40kpit.com%7Cf6cf4561b35e4c2d55f308d69fe010a0%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C636872182049287622&sdata=8mRYNuBZzRQSz43kxNXcszwRQN1MB5qDw5BQFxsbT7Q%3D&reserved=0{PV}.t file://lighttpd \ file://lighttpd.service \ file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \ + file://run-ptest \ + file://0002-use-standard-sbin-and-lib-path-for-ptest.patch \ "SRC_URI[md5sum] = "
1e3a9eb5078f481e3a8a1d0aaac8c3c8"meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb +0
-0@@ -49,7 +87,7 @@ PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua5.1"
EXTRA_OECONF+= "--enable-lfs"meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb +1
-1-inherit autotools pkgconfig update-rc.d gettext systemd +inherit autotools pkgconfig update-rc.d gettext systemd ptest
INITSCRIPT_NAME= "lighttpd"INITSCRIPT_PARAMS= "defaults 70"meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb +0
-0@@ -73,6 +111,32 @@ do_install_append() {ln -sf ${localstatedir}/tmp ${D}/www/var
}meta/recipes-extended/lighttpd/lighttpd_1.4.48.bb +26
-0+do_install_ptest() { + t="${D}${PTEST_PATH}" + for i in tests src + do + cp -r "${S}/${i}" "${t}" + cp -r "${B}/${i}"/* "${t}/${i}" + rm -rf "${t}/${i}"/*.lo "${t}/${i}"/*.la "${t}/${i}"/*.c "${t}/${i}"/*.o "${t}/${i}"/*.h + done + + install -D "${B}/${TARGET_PREFIX}libtool" "${t}/${TARGET_PREFIX}libtool" + + # Remove build host references... + find "${t}" -name "Makefile" | xargs \ + sed -i -e "s/^srcdir = \(.*\)/srcdir = ./" \ + -e "s/^Makefile/_Makefile/" \ + -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \ + -e "s/^abs_builddir = \(.*\)/abs_builddir = ./" \ + -e "s/^abs_srcdir = \(.*\)/abs_srcdir = ./" \ + -e "s/^top_srcdir = \(.*\)/abs_srcdir = ../" \ + -e "s,${TARGET_PREFIX}gcc,gcc,g" \ + -e "s/^abs_top_srcdir = \(.*\)/abs_top_srcdir = ./" \ + -e "s,${S},,g" \ + -e "s,${B},,g" \ + -e "s,${STAGING_DIR_NATIVE},,g" +} +FILES_${PN} += "${sysconfdir} /www"
CONFFILES_${PN} = "
${sysconfdir}/lighttpd.conf"
--
2.7.4Quoted 6 lines
This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails. --
_______________________________________________
poky mailing list
[email protected]
https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Flistinfo%2Fpoky&data=02%7C01%7CAditya.Tayade%40kpit.com%7Cf6cf4561b35e4c2d55f308d69fe010a0%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C636872182049287622&sdata=59N8%2FG1iGOB%2FCS5mSS04Lsw%2Bp2QTGG0NS3jDOzJwZ2o%3D&reserved=0This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.