aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2018-04-16 23:08:16 -0400
committerArmin Kuster <akuster808@gmail.com>2018-05-01 18:14:27 -0700
commitbfc66e11b8c83da43bdefdc82b21afd250502ad1 (patch)
treef0f0ac5dd77e0bdd3cf46be58a6ead64c0e9c7ca /meta-oe/recipes-support
parentebfc68a64eca606033ff888f2e06842dd4e2d6d4 (diff)
downloadmeta-openembedded-contrib-bfc66e11b8c83da43bdefdc82b21afd250502ad1.tar.gz
meta-openembedded-contrib-bfc66e11b8c83da43bdefdc82b21afd250502ad1.tar.bz2
meta-openembedded-contrib-bfc66e11b8c83da43bdefdc82b21afd250502ad1.zip
libteam: add ptest
The scripts/team_basic_test.py will be called as testcase. RedHat specific tests have been disabled since they are incampatible with OE. Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r--meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-disable-RedHat-specific-test.patch32
-rw-r--r--meta-oe/recipes-support/libteam/libteam/run-ptest3
-rw-r--r--meta-oe/recipes-support/libteam/libteam_1.27.bb8
3 files changed, 42 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-disable-RedHat-specific-test.patch b/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-disable-RedHat-specific-test.patch
new file mode 100644
index 0000000000..468a55f346
--- /dev/null
+++ b/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-disable-RedHat-specific-test.patch
@@ -0,0 +1,32 @@
+From 00debe6bd4cf5a3133a8fbaab75f7447a39fa655 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Thu, 12 Apr 2018 01:54:15 +0000
+Subject: [PATCH] team_basic_test.py: disable RedHat specific test
+
+The test _run_teamd_initscripts() is for RedHat ifcfg scripts which are
+incompatible with OE:
+ /etc/sysconfig/network-scripts/ifcfg-*
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ scripts/team_basic_test.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/team_basic_test.py b/scripts/team_basic_test.py
+index b05be9e..faabd18 100755
+--- a/scripts/team_basic_test.py
++++ b/scripts/team_basic_test.py
+@@ -171,7 +171,7 @@ TEAM_PORT_CONFIG='{"prio": 10}'
+ try:
+ for mode_name in self._team_modes:
+ self._run_one_mode(mode_name)
+- self._run_teamd_initscripts()
++ #self._run_teamd_initscripts()
+ finally:
+ cmd_exec("modprobe -r team_mode_loadbalance team_mode_roundrobin team_mode_activebackup team_mode_broadcast team");
+
+--
+2.13.3
+
diff --git a/meta-oe/recipes-support/libteam/libteam/run-ptest b/meta-oe/recipes-support/libteam/libteam/run-ptest
new file mode 100644
index 0000000000..4ba5acf051
--- /dev/null
+++ b/meta-oe/recipes-support/libteam/libteam/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+python $(dirname $0)/team_basic_test.py
diff --git a/meta-oe/recipes-support/libteam/libteam_1.27.bb b/meta-oe/recipes-support/libteam/libteam_1.27.bb
index 32227009e3..442592de90 100644
--- a/meta-oe/recipes-support/libteam/libteam_1.27.bb
+++ b/meta-oe/recipes-support/libteam/libteam_1.27.bb
@@ -10,6 +10,8 @@ DEPENDS = "libnl libdaemon jansson"
SRC_URI = "git://github.com/jpirko/libteam \
file://0001-include-sys-select.h-for-fd_set-definition.patch \
file://0002-teamd-Re-adjust-include-header-order.patch \
+ file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \
+ file://run-ptest \
"
SRCREV = "91a928a56a501daac5ce8b3c16bd9943661f1d16"
@@ -18,7 +20,7 @@ SRC_URI[sha256sum] = "d65286379141db141bea33424ec0507bb0f827a0bf03d9c65004bb593e
S = "${WORKDIR}/git"
-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
FILES_${PN} = "${libdir}/libteam${SOLIBS} \
"
@@ -33,4 +35,8 @@ FILES_${PN}-utils = "${bindir}/bond2team \
"
RDEPENDS_${PN}-utils = "bash"
+RDEPENDS_${PN}-ptest = "python"
+do_install_ptest() {
+ install ${S}/scripts/team_basic_test.py ${D}${PTEST_PATH}/
+}