summaryrefslogtreecommitdiffstats
path: root/recipes-networking/openvswitch/files/openvswitch-add-ptest.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-networking/openvswitch/files/openvswitch-add-ptest.patch')
-rw-r--r--recipes-networking/openvswitch/files/openvswitch-add-ptest.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/recipes-networking/openvswitch/files/openvswitch-add-ptest.patch b/recipes-networking/openvswitch/files/openvswitch-add-ptest.patch
new file mode 100644
index 00000000..aebb1823
--- /dev/null
+++ b/recipes-networking/openvswitch/files/openvswitch-add-ptest.patch
@@ -0,0 +1,67 @@
1Add test-install rule to support ptest execution
2
3Signed-off-by: Radu Patriu <radu.patriu@enea.com>
4
5Index: ovs/Makefile.am
6===================================================================
7--- ovs.orig/Makefile.am 2014-03-10 16:19:46.000000000 +0200
8+++ ovs/Makefile.am 2014-03-10 16:23:10.481075341 +0200
9@@ -276,3 +276,4 @@
10 include python/automake.mk
11 include python/compat/automake.mk
12 include tutorial/automake.mk
13+include test.mk
14Index: ovs/test.mk
15===================================================================
16--- /dev/null 1970-01-01 00:00:00.000000000 +0000
17+++ ovs/test.mk 2014-03-10 16:42:41.000000000 +0200
18@@ -0,0 +1,49 @@
19+TEST_DEST ?= ${prefix}/lib/openvswitch
20+TEST_ROOT ?= ${prefix}/lib/openvswitch
21+TEST_DEPEND =
22+
23+if HAVE_OPENSSL
24+TEST_DEPEND += $(TESTPKI_FILES)
25+endif
26+
27+test-install: $(TEST_DEPEND)
28+ @list='$(noinst_PROGRAMS) $(EXTRA_DIST) $(dist_check_SCRIPTS) $(TEST_DEPEND) tests/atlocal tests/atconfig' ;\
29+ install -d $(TEST_DEST)/tests ;\
30+ install -d $(TEST_DEST)/python ;\
31+ install -d $(TEST_DEST)/python/ovs ;\
32+ install -d $(TEST_DEST)/python/ovs/db ;\
33+ install -d $(TEST_DEST)/python/ovs/unixctl ;\
34+ install -d $(TEST_DEST)/vswitchd ;\
35+ install vswitchd/vswitch.ovsschema $(TEST_DEST)/vswitchd ;\
36+ install -d $(TEST_DEST)/debian ;\
37+ install debian/ovs-monitor-ipsec $(TEST_DEST)/debian ;\
38+ install -d $(TEST_DEST)/build-aux ;\
39+ install build-aux/check-structs $(TEST_DEST)/build-aux ;\
40+ install -d $(TEST_DEST)/xenserver ;\
41+ install xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync $(TEST_DEST)/xenserver ;\
42+ install xenserver/opt_xensource_libexec_interface-reconfigure $(TEST_DEST)/xenserver ;\
43+ install xenserver/opt_xensource_libexec_InterfaceReconfigure.py $(TEST_DEST)/xenserver ;\
44+ install xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py $(TEST_DEST)/xenserver ;\
45+ install xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py $(TEST_DEST)/xenserver ;\
46+ install -d $(TEST_DEST)/vtep ;\
47+ install vtep/vtep.ovsschema $(TEST_DEST)/vtep ;\
48+ for p in $$list ; do \
49+ echo $$p ;\
50+ p=$${p#./} ;\
51+ pre=$${p#tests\/} ;\
52+ if test $$pre != $$p ; then \
53+ echo installing $$p to $(TEST_DEST)/tests/$$pre ;\
54+ install $$p $(TEST_DEST)/tests/$$pre ;\
55+ continue ;\
56+ fi ;\
57+ pre=$${p#python\/ovs\/} ;\
58+ if test $$pre != $$p ; then \
59+ echo installing $$p to $(TEST_DEST)/python/ovs/$$pre ;\
60+ install $$p $(TEST_DEST)/python/ovs/$$pre ;\
61+ continue ;\
62+ fi; \
63+ done ;\
64+ sed -i 's|abs_builddir=.*|abs_builddir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
65+ sed -i 's|abs_srcdir=.*|abs_srcdir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
66+ sed -i 's|abs_top_srcdir=.*|abs_top_srcdir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
67+ sed -i 's|abs_top_builddir=.*|abs_top_builddir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig