aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-networking/openvswitch/files/openvswitch-add-ptest.patch
blob: 4fe3abd8165f559c27701c59d7f9a8ad109b89c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Add test-install rule to support ptest execution

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Radu Patriu <radu.patriu@enea.com>

Index: openvswitch-2.1.2/Makefile.am
===================================================================
--- openvswitch-2.1.2.orig/Makefile.am
+++ openvswitch-2.1.2/Makefile.am
@@ -300,3 +300,5 @@
 include python/compat/automake.mk
 include tutorial/automake.mk
 include vtep/automake.mk
+include test.mk
+
Index: openvswitch-2.1.2/test.mk
===================================================================
--- /dev/null
+++ openvswitch-2.1.2/test.mk
@@ -0,0 +1,49 @@
+TEST_DEST ?= ${prefix}/lib/openvswitch
+TEST_ROOT ?= ${prefix}/lib/openvswitch
+TEST_DEPEND =
+
+if HAVE_OPENSSL
+TEST_DEPEND += $(TESTPKI_FILES)
+endif
+
+test-install: $(TEST_DEPEND)
+	@list='$(noinst_PROGRAMS) $(EXTRA_DIST) $(dist_check_SCRIPTS) $(TEST_DEPEND) tests/atlocal tests/atconfig' ;\
+	install -d $(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 -d $(TEST_DEST)/debian ;\
+	install debian/ovs-monitor-ipsec $(TEST_DEST)/debian ;\
+	install -d $(TEST_DEST)/build-aux ;\
+	install 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 -d $(TEST_DEST)/vtep ;\
+	install vtep/vtep.ovsschema $(TEST_DEST)/vtep ;\
+	for p in $$list ; do \
+	  echo $$p ;\
+	  p=$${p#./} ;\
+	  pre=$${p#tests\/} ;\
+	  if test $$pre != $$p ; then \
+	    echo installing $$p to $(TEST_DEST)/tests/$$pre ;\
+	    install $$p $(TEST_DEST)/tests/$$pre ;\
+	    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 ;\
+	    continue ;\
+	  fi; \
+	done ;\
+	sed -i 's|abs_builddir=.*|abs_builddir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
+	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