[meta-virtualization] [PATCH 1/1] openvswitch: Fix ptest for v2.5

zhe.he at windriver.com zhe.he at windriver.com
Mon Apr 4 21:59:54 PDT 2016


From: He Zhe <zhe.he at windriver.com>

- Copy certain files from srcdir since it has been different from
  build directory.
- Copy more necessary files for new added test cases.
- Modify config files for running on target.
- Add necessary RDEPENDS

Signed-off-by: He Zhe <zhe.he at windriver.com>
---
 ...-8c0b419a0b9ac0141d6973dcc80306dfc6a83d31.patch | 79 ++++++++++++++++------
 recipes-networking/openvswitch/openvswitch_git.bb  |  3 +
 2 files changed, 63 insertions(+), 19 deletions(-)

diff --git a/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-8c0b419a0b9ac0141d6973dcc80306dfc6a83d31.patch b/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-8c0b419a0b9ac0141d6973dcc80306dfc6a83d31.patch
index b79cb1b..7e74044 100644
--- a/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-8c0b419a0b9ac0141d6973dcc80306dfc6a83d31.patch
+++ b/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-8c0b419a0b9ac0141d6973dcc80306dfc6a83d31.patch
@@ -1,23 +1,38 @@
-Add test-install rule to support ptest execution
+From e20556d7cf0fc8258db77c1f3e0a160cf9fd4514 Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he at windriver.com>
+Date: Wed, 30 Mar 2016 06:23:45 -0400
+Subject: [PATCH] openvswitch: Add test-install rule to support ptest execution
 
 Signed-off-by: Radu Patriu <radu.patriu at enea.com>
 
+Fix ptest for v2.5
+ - Copy certain files from srcdir since it has been different from
+   build directory.
+ - Copy more necessary files for new added test cases.
+ - Modify config files for running on target.
+
+Signed-off-by: He Zhe <zhe.he at windriver.com>
 ---
- Makefile.am |    2 ++
- test.mk     |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 51 insertions(+)
+ Makefile.am |  1 +
+ test.mk     | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 73 insertions(+)
+ create mode 100644 test.mk
 
+diff --git a/Makefile.am b/Makefile.am
+index ed43c2f..f38d278 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -401,3 +401,5 @@
+@@ -401,3 +401,4 @@ include datapath-windows/include/automake.mk
  include windows/automake.mk
  include ovn/automake.mk
  include selinux/automake.mk
 +include test.mk
-+
+diff --git a/test.mk b/test.mk
+new file mode 100644
+index 0000000..b10a581
 --- /dev/null
 +++ b/test.mk
-@@ -0,0 +1,49 @@
+@@ -0,0 +1,72 @@
 +TEST_DEST ?= ${prefix}/lib/openvswitch
 +TEST_ROOT ?= ${prefix}/lib/openvswitch
 +TEST_DEPEND =
@@ -29,37 +44,53 @@ Signed-off-by: Radu Patriu <radu.patriu at enea.com>
 +test-install: $(TEST_DEPEND)
 +	@list='$(noinst_PROGRAMS) $(EXTRA_DIST) $(dist_check_SCRIPTS) $(TEST_DEPEND) tests/atlocal tests/atconfig' ;\
 +	install -d $(TEST_DEST)/tests ;\
++	install $(srcdir)/vtep/ovs-vtep $(TEST_DEST)/tests ;\
 +	install -d $(TEST_DEST)/python ;\
 +	install -d $(TEST_DEST)/python/ovs ;\
 +	install -d $(TEST_DEST)/python/ovs/db ;\
 +	install -d $(TEST_DEST)/python/ovs/unixctl ;\
 +	install -d $(TEST_DEST)/vswitchd ;\
-+	install vswitchd/vswitch.ovsschema $(TEST_DEST)/vswitchd ;\
++	install $(srcdir)/vswitchd/vswitch.ovsschema $(TEST_DEST)/vswitchd ;\
++	install vswitchd/ovs-vswitchd $(TEST_DEST)/vswitchd ;\
 +	install -d $(TEST_DEST)/debian ;\
-+	install debian/ovs-monitor-ipsec $(TEST_DEST)/debian ;\
++	install $(srcdir)/debian/ovs-monitor-ipsec $(TEST_DEST)/debian ;\
 +	install -d $(TEST_DEST)/build-aux ;\
-+	install build-aux/check-structs $(TEST_DEST)/build-aux ;\
++	install $(srcdir)/build-aux/check-structs $(TEST_DEST)/build-aux ;\
 +	install -d $(TEST_DEST)/xenserver ;\
-+	install xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync $(TEST_DEST)/xenserver ;\
-+	install xenserver/opt_xensource_libexec_interface-reconfigure $(TEST_DEST)/xenserver ;\
-+	install xenserver/opt_xensource_libexec_InterfaceReconfigure.py $(TEST_DEST)/xenserver ;\
-+	install xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py $(TEST_DEST)/xenserver ;\
-+	install xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/opt_xensource_libexec_interface-reconfigure $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigure.py $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py $(TEST_DEST)/xenserver ;\
 +	install -d $(TEST_DEST)/vtep ;\
-+	install vtep/vtep.ovsschema $(TEST_DEST)/vtep ;\
++	install $(srcdir)/vtep/vtep.ovsschema $(TEST_DEST)/vtep ;\
++	install -d $(TEST_DEST)/ovn ;\
++	install $(srcdir)/ovn/ovn-nb.ovsschema $(TEST_DEST)/ovn ;\
++	install $(srcdir)/ovn/ovn-sb.ovsschema $(TEST_DEST)/ovn ;\
++	install -d $(TEST_DEST)/utilities ;\
++	install $(srcdir)/utilities/ovs-pcap.in $(TEST_DEST)/utilities ;\
++	install $(srcdir)/utilities/ovs-pki.in $(TEST_DEST)/utilities ;\
 +	for p in $$list ; do \
 +	  echo $$p ;\
-+	  p=$${p#./} ;\
++	  p=$${p#../git/} ;\
 +	  pre=$${p#tests\/} ;\
 +	  if test $$pre != $$p ; then \
 +	    echo installing $$p to $(TEST_DEST)/tests/$$pre ;\
-+	    install $$p $(TEST_DEST)/tests/$$pre ;\
++	    if test -f $$p ; then \
++	      install $$p $(TEST_DEST)/tests/$$pre ;\
++	    else \
++	      install $(srcdir)/$$p $(TEST_DEST)/tests/$$pre ;\
++	    fi ;\
 +	    continue ;\
 +	  fi ;\
 +	  pre=$${p#python\/ovs\/} ;\
 +	  if test $$pre != $$p ; then \
 +	    echo installing $$p to $(TEST_DEST)/python/ovs/$$pre ;\
-+	    install $$p $(TEST_DEST)/python/ovs/$$pre ;\
++	    if test -f $$p ; then \
++	      install $$p $(TEST_DEST)/python/ovs/$$pre ;\
++	    else \
++	      install $(srcdir)/$$p $(TEST_DEST)/python/ovs/$$pre ;\
++	    fi ;\
 +	    continue ;\
 +	  fi; \
 +	done ;\
@@ -67,3 +98,13 @@ Signed-off-by: Radu Patriu <radu.patriu at enea.com>
 +	sed -i 's|abs_srcdir=.*|abs_srcdir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
 +	sed -i 's|abs_top_srcdir=.*|abs_top_srcdir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
 +	sed -i 's|abs_top_builddir=.*|abs_top_builddir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|at_srcdir=.*|at_srcdir='"'"'.'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|at_top_srcdir=.*|at_top_srcdir='"'"'..'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|at_top_build_prefix=.*|at_top_build_prefix='"'"'../'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|^\(.*config\.log.*\)|#\1|g' $(TEST_DEST)/tests/testsuite
++	sed -i 's|$$srcdir|$$abs_srcdir|g' $(TEST_DEST)/tests/testsuite
++	sed -i 's|ovs-appctl-bashcomp\.bash|/etc/bash_completion.d/ovs-appctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
++	sed -i 's|ovs-vsctl-bashcomp\.bash|/etc/bash_completion.d/ovs-vsctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
+-- 
+1.9.1
+
diff --git a/recipes-networking/openvswitch/openvswitch_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb
index 700a306..2f7fe3e 100644
--- a/recipes-networking/openvswitch/openvswitch_git.bb
+++ b/recipes-networking/openvswitch/openvswitch_git.bb
@@ -6,6 +6,9 @@ RDEPENDS_${PN}-ptest += "\
 	python-logging python-syslog python-argparse python-io \
 	python-fcntl python-shell python-lang python-xml python-math \
 	python-datetime python-netclient python sed \
+	ldd perl-module-socket perl-module-carp perl-module-exporter \
+	perl-module-xsloader python-netserver python-threading \
+	python-resource python-subprocess \
 	"
 
 S = "${WORKDIR}/git"
-- 
1.9.1



More information about the meta-virtualization mailing list