diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:07 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:07 +0200 |
commit | ee97d3d279164f8b44fb8afc997e4ae953d17106 (patch) | |
tree | bff0bd4240f00bbb21624c1df55583f61abaea25 /recipes-extended/libvirt/libvirt/runptest.patch | |
download | meta-virtualization-ee97d3d279164f8b44fb8afc997e4ae953d17106.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'recipes-extended/libvirt/libvirt/runptest.patch')
-rw-r--r-- | recipes-extended/libvirt/libvirt/runptest.patch | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/recipes-extended/libvirt/libvirt/runptest.patch b/recipes-extended/libvirt/libvirt/runptest.patch new file mode 100644 index 00000000..0c019751 --- /dev/null +++ b/recipes-extended/libvirt/libvirt/runptest.patch | |||
@@ -0,0 +1,112 @@ | |||
1 | Add 'install-ptest' rule. | ||
2 | Change TESTS_ENVIRONMENT to allow running outside build dir. | ||
3 | |||
4 | Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com> | ||
5 | Upstream-status: Pending | ||
6 | |||
7 | diff -uNr a/tests/Makefile.am b/tests/Makefile.am | ||
8 | --- a/tests/Makefile.am 2014-03-11 11:37:31.497605736 +0200 | ||
9 | +++ b/tests/Makefile.am 2014-03-17 15:57:35.515268399 +0200 | ||
10 | @@ -27,9 +27,11 @@ | ||
11 | -I$(top_srcdir)/src/conf \ | ||
12 | $(GETTEXT_CPPFLAGS) | ||
13 | |||
14 | +PTEST_DIR ?= /usr/lib/libvirt/ptest | ||
15 | + | ||
16 | AM_CFLAGS = \ | ||
17 | - -Dabs_builddir="\"`pwd`\"" \ | ||
18 | - -Dabs_srcdir="\"`cd '$(srcdir)'; pwd`\"" \ | ||
19 | + -Dabs_builddir="\"$(PTEST_DIR)/tests\"" \ | ||
20 | + -Dabs_srcdir="\"$(PTEST_DIR)/tests\"" \ | ||
21 | $(LIBXML_CFLAGS) \ | ||
22 | $(GNUTLS_CFLAGS) \ | ||
23 | $(SASL_CFLAGS) \ | ||
24 | @@ -41,7 +43,7 @@ | ||
25 | |||
26 | if WITH_DRIVER_MODULES | ||
27 | INCLUDES += \ | ||
28 | - -DTEST_DRIVER_DIR=\"$(top_builddir)/src/.libs\" | ||
29 | + -DTEST_DRIVER_DIR=\"$(PTEST_DIR)/src/.libs\" | ||
30 | endif WITH_DRIVER_MODULES | ||
31 | |||
32 | PROBES_O = | ||
33 | @@ -344,20 +346,19 @@ | ||
34 | # Also, BSD sh doesn't like 'a=b b=$$a', so we can't use an | ||
35 | # intermediate shell variable, but must do all the expansion in make | ||
36 | |||
37 | -lv_abs_top_builddir=`cd '$(top_builddir)'; pwd` | ||
38 | path_add = $(subst :,$(PATH_SEPARATOR),\ | ||
39 | - $(subst !,$(lv_abs_top_builddir)/,!daemon:!tools:!tests)) | ||
40 | + $(subst !,$(PTEST_DIR)/,!daemon:!tools:!tests)) | ||
41 | |||
42 | VIR_TEST_EXPENSIVE ?= $(VIR_TEST_EXPENSIVE_DEFAULT) | ||
43 | TESTS_ENVIRONMENT = \ | ||
44 | - abs_top_builddir=$(lv_abs_top_builddir) \ | ||
45 | - abs_top_srcdir=`cd '$(top_srcdir)'; pwd` \ | ||
46 | - abs_builddir=`pwd` \ | ||
47 | - abs_srcdir=`cd '$(srcdir)'; pwd` \ | ||
48 | - CONFIG_HEADER="`cd '$(top_builddir)'; pwd`/config.h" \ | ||
49 | + abs_top_builddir="$(PTEST_DIR)" \ | ||
50 | + abs_top_srcdir="$(PTEST_DIR)" \ | ||
51 | + abs_builddir="$(PTEST_DIR)/tests" \ | ||
52 | + abs_srcdir="$(PTEST_DIR)/tests" \ | ||
53 | + CONFIG_HEADER="$(PTEST_DIR)/config.h" \ | ||
54 | PATH="$(path_add)$(PATH_SEPARATOR)$$PATH" \ | ||
55 | SHELL="$(SHELL)" \ | ||
56 | - LIBVIRT_DRIVER_DIR="$(lv_abs_top_builddir)/src/.libs" \ | ||
57 | + LIBVIRT_DRIVER_DIR="$(PTEST_DIR)/src/.libs" \ | ||
58 | LIBVIRT_AUTOSTART=0 \ | ||
59 | LC_ALL=C \ | ||
60 | VIR_TEST_EXPENSIVE=$(VIR_TEST_EXPENSIVE) \ | ||
61 | @@ -933,5 +934,51 @@ | ||
62 | EXTRA_DIST += object-locking.ml | ||
63 | endif ! WITH_CIL | ||
64 | |||
65 | +buildtest-TESTS: $(TESTS) $(test_libraries) $(test_helpers) | ||
66 | + | ||
67 | +PTESTS = $(TESTS) $(test_helpers) test-lib.sh schematestutils.sh | ||
68 | + | ||
69 | +install-ptest: | ||
70 | + list='$(TESTS) $(test_helpers) test-lib.sh schematestutils.sh' | ||
71 | + install -d $(DEST_DIR)/tools | ||
72 | + @(if [ -d ../tools/.libs ] ; then cd ../tools/.libs; fi; \ | ||
73 | + install * $(DEST_DIR)/tools) | ||
74 | + install -d $(DEST_DIR)/src/network | ||
75 | + cp ../src/network/*.xml $(DEST_DIR)/src/network | ||
76 | + install -d $(DEST_DIR)/src/cpu | ||
77 | + cp ../src/cpu/*.xml $(DEST_DIR)/src/cpu | ||
78 | + install ../src/libvirt_iohelper $(DEST_DIR)/src | ||
79 | + install -D ../daemon/libvirtd $(DEST_DIR)/daemon/libvirtd | ||
80 | + install -D ../daemon/libvirtd.conf $(DEST_DIR)/daemon/libvirtd.conf | ||
81 | + @(if [ -d ../daemon/.libs ] ; then cd ../daemon/.libs; fi; \ | ||
82 | + install * $(DEST_DIR)/daemon) | ||
83 | + install -d $(DEST_DIR)/src/.libs | ||
84 | + @(if [ -d ../src/.libs ] ; then cd ../src/.libs; fi; \ | ||
85 | + install * $(DEST_DIR)/src/.libs) | ||
86 | + install -d $(DEST_DIR)/docs/schemas | ||
87 | + cp ../docs/schemas/*.rng $(DEST_DIR)/docs/schemas | ||
88 | + cp -r ../build-aux $(DEST_DIR) | ||
89 | + install -d $(DEST_DIR)/examples/xml | ||
90 | + cp -r ../examples/xml/test $(DEST_DIR)/examples/xml | ||
91 | + install -d $(DEST_DIR)/tests/.libs | ||
92 | + find . -type d -name "*xml2xml*" -exec cp -r {} $(DEST_DIR)/tests \; | ||
93 | + find . -type d -name "*data" -exec cp -r {} $(DEST_DIR)/tests \; | ||
94 | + @(for file in $(PTESTS); do \ | ||
95 | + if [ -f .libs/$$file ]; then \ | ||
96 | + install .libs/$$file $(DEST_DIR)/tests; \ | ||
97 | + else \ | ||
98 | + install $$file $(DEST_DIR)/tests; \ | ||
99 | + fi; \ | ||
100 | + done;) | ||
101 | + @(if [ -d .libs ]; then install .libs/*.so $(DEST_DIR)/tests/.libs; fi;) | ||
102 | + cp ../config.h $(DEST_DIR) | ||
103 | + cp Makefile $(DEST_DIR)/tests | ||
104 | + sed -i -e 's/^Makefile:/_Makefile:/' $(DEST_DIR)/tests/Makefile | ||
105 | + cp ../Makefile $(DEST_DIR) | ||
106 | + sed -i -e 's|^Makefile:|_Makefile:|' $(DEST_DIR)/Makefile | ||
107 | + sed -i -e 's|$(BUILD_DIR)|$(PTEST_DIR)|g' $(DEST_DIR)/tests/Makefile | ||
108 | + sed -i -e 's|$(BUILD_DIR)|$(PTEST_DIR)|g' $(DEST_DIR)/Makefile | ||
109 | + sed -i -e 's|^\(.*\.log:\) \(.*EXEEXT.*\)|\1|g' $(DEST_DIR)/tests/Makefile | ||
110 | + | ||
111 | CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx \ | ||
112 | object-locking-files.txt | ||