diff options
author | Wenzong Fan <wenzong.fan@windriver.com> | 2018-04-16 23:08:16 -0400 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-05-01 18:14:27 -0700 |
commit | bfc66e11b8c83da43bdefdc82b21afd250502ad1 (patch) | |
tree | f0f0ac5dd77e0bdd3cf46be58a6ead64c0e9c7ca | |
parent | ebfc68a64eca606033ff888f2e06842dd4e2d6d4 (diff) | |
download | meta-openembedded-bfc66e11b8c83da43bdefdc82b21afd250502ad1.tar.gz |
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>
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 000000000..468a55f34 --- /dev/null +++ b/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-disable-RedHat-specific-test.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 00debe6bd4cf5a3133a8fbaab75f7447a39fa655 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | ||
3 | Date: Thu, 12 Apr 2018 01:54:15 +0000 | ||
4 | Subject: [PATCH] team_basic_test.py: disable RedHat specific test | ||
5 | |||
6 | The test _run_teamd_initscripts() is for RedHat ifcfg scripts which are | ||
7 | incompatible with OE: | ||
8 | /etc/sysconfig/network-scripts/ifcfg-* | ||
9 | |||
10 | Upstream-Status: Inappropriate [OE Specific] | ||
11 | |||
12 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
13 | --- | ||
14 | scripts/team_basic_test.py | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/scripts/team_basic_test.py b/scripts/team_basic_test.py | ||
18 | index b05be9e..faabd18 100755 | ||
19 | --- a/scripts/team_basic_test.py | ||
20 | +++ b/scripts/team_basic_test.py | ||
21 | @@ -171,7 +171,7 @@ TEAM_PORT_CONFIG='{"prio": 10}' | ||
22 | try: | ||
23 | for mode_name in self._team_modes: | ||
24 | self._run_one_mode(mode_name) | ||
25 | - self._run_teamd_initscripts() | ||
26 | + #self._run_teamd_initscripts() | ||
27 | finally: | ||
28 | cmd_exec("modprobe -r team_mode_loadbalance team_mode_roundrobin team_mode_activebackup team_mode_broadcast team"); | ||
29 | |||
30 | -- | ||
31 | 2.13.3 | ||
32 | |||
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 000000000..4ba5acf05 --- /dev/null +++ b/meta-oe/recipes-support/libteam/libteam/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | 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 32227009e..442592de9 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" | |||
10 | SRC_URI = "git://github.com/jpirko/libteam \ | 10 | SRC_URI = "git://github.com/jpirko/libteam \ |
11 | file://0001-include-sys-select.h-for-fd_set-definition.patch \ | 11 | file://0001-include-sys-select.h-for-fd_set-definition.patch \ |
12 | file://0002-teamd-Re-adjust-include-header-order.patch \ | 12 | file://0002-teamd-Re-adjust-include-header-order.patch \ |
13 | file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \ | ||
14 | file://run-ptest \ | ||
13 | " | 15 | " |
14 | SRCREV = "91a928a56a501daac5ce8b3c16bd9943661f1d16" | 16 | SRCREV = "91a928a56a501daac5ce8b3c16bd9943661f1d16" |
15 | 17 | ||
@@ -18,7 +20,7 @@ SRC_URI[sha256sum] = "d65286379141db141bea33424ec0507bb0f827a0bf03d9c65004bb593e | |||
18 | 20 | ||
19 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
20 | 22 | ||
21 | inherit autotools pkgconfig | 23 | inherit autotools pkgconfig ptest |
22 | 24 | ||
23 | FILES_${PN} = "${libdir}/libteam${SOLIBS} \ | 25 | FILES_${PN} = "${libdir}/libteam${SOLIBS} \ |
24 | " | 26 | " |
@@ -33,4 +35,8 @@ FILES_${PN}-utils = "${bindir}/bond2team \ | |||
33 | " | 35 | " |
34 | 36 | ||
35 | RDEPENDS_${PN}-utils = "bash" | 37 | RDEPENDS_${PN}-utils = "bash" |
38 | RDEPENDS_${PN}-ptest = "python" | ||
36 | 39 | ||
40 | do_install_ptest() { | ||
41 | install ${S}/scripts/team_basic_test.py ${D}${PTEST_PATH}/ | ||
42 | } | ||