Skip to contentSkip to conversation

lighttpd: added ptest

PATCH In review Aditya Tayade 2 participants 2 messages Mar 4, 2019 – Mar 6, 2019

lore
Share & tools
lore
#0 lore raw

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
new file mode 100644
index 0000000..cd4b2b3
@@ -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
new file mode 100644
index 0000000..b6781c0
@@ -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.

#1 lore raw
Quoted 5 lines · Aditya Tayade

Reused lighttpd internal tests and did minimal patching to fix paths.

Upstream-Status: Pending

Quoted 9 lines
---
 ...-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

I like the idea of adding these ptests but we need to do this against master before we can do this in older releases like thud or sumo.

Would you be able to provide a version for master (which has a different newer version of lighttpd?

Cheers,

Richard