Skip to contentSkip to conversation

openl2tp: add ptest support

PATCH New [email protected] 1 participant 1 message Jan 4, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openl2tp: add ptest support

From: Mingli Yu <[email protected]>

* Add run-ptest
* Add patch to enable the regressin test

---
 .../openl2tp/openl2tp/openl2tpd-enable-tests.patch | 24 ++++++
 .../recipes-protocols/openl2tp/openl2tp/run-ptest  | 97 ++++++++++++++++++++++
 .../recipes-protocols/openl2tp/openl2tp_1.8.bb     | 12 ++-
 3 files changed, 132 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-enable-tests.patch
 create mode 100644 meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest
meta-networking/recipes-protocols/openl2tp/openl2tp/openl2tpd-enable-tests.patch new file +24 -0
new file mode 100644
index 000000000..0bece2f4d
@@ -0,0 +1,24 @@
+commit 3e96a6c41bdd26417265a45ed685138d8eed564e
+Author: Aws Ismail <[email protected]>
+Date:   Fri Sep 14 02:32:53 2012 -0400
+
+    openl2tp: Enable tests
+    
+    Build the test direcctory as part
+    of the overall build
+    
+    Signed-off-by: Aws Ismail <[email protected]>
+
+diff --git a/Makefile b/Makefile
+index 412cf4d..adf4f44 100644
+--- a/Makefile
++++ b/Makefile
+@@ -16,7 +16,7 @@ L2TP_FEATURE_LOCAL_CONF_FILE=	y
+ 
+ # Define to include test code. This must be defined to run the
+ # regression tests
+-# L2TP_TEST=		y
++L2TP_TEST=y
+ 
+ # Define to compile in debug code. Also makes default trace flags
+ # enable all messages
meta-networking/recipes-protocols/openl2tp/openl2tp/run-ptest new file +97 -0

97 lines not on this page · raw message

meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb +11 -1
index bbde8a337..bf6850b17 100644
@@ -31,6 +31,8 @@ SRC_URI = "ftp://ftp.openl2tp.org/releases/${BP}/${BP}.tar.gz \
            file://openl2tpd-initscript-fix-sysconfig.patch \
            file://openl2tpd-initscript-fix-warning.patch \
            file://openl2tpd.service \
+           file://openl2tpd-enable-tests.patch \
+           file://run-ptest \
            "
 
 SRC_URI_append_libc-musl = "\
@@ -41,7 +43,7 @@ SRC_URI_append_libc-musl = "\
 SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0"
 SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f"
 
-inherit autotools-brokensep pkgconfig systemd
+inherit autotools-brokensep pkgconfig systemd ptest
 
 SYSTEMD_SERVICE_${PN} = "openl2tpd.service"
 SYSTEMD_AUTO_ENABLE = "disable"
@@ -85,4 +87,12 @@ do_install_append () {
     fi
 }
 
+do_install_ptest () {
+    for i in all.tcl configfile.test peer_profile.test ppp_profile.test \
+    session_profile.test session.test system.test test_procs.tcl \
+    thirdparty_lns.test tunnel_profile.test tunnel.test; do
+        install -m 0755 ${S}/test/$i ${D}${PTEST_PATH}
+    done
+}
+
 RDEPENDS_${PN} = "ppp ppp-l2tp bash"
Signature · 1 line
2.13.3