summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/clutter/clutter/test-conformance-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/clutter/clutter/test-conformance-fix.patch')
-rw-r--r--meta/recipes-graphics/clutter/clutter/test-conformance-fix.patch68
1 files changed, 0 insertions, 68 deletions
diff --git a/meta/recipes-graphics/clutter/clutter/test-conformance-fix.patch b/meta/recipes-graphics/clutter/clutter/test-conformance-fix.patch
deleted file mode 100644
index ccc6c2a32d..0000000000
--- a/meta/recipes-graphics/clutter/clutter/test-conformance-fix.patch
+++ /dev/null
@@ -1,68 +0,0 @@
1Compiling conformance test leads running test-conformance target binary, and
2gets failure in cross-compile environment. Introduce this commit from upstream
3to fix it.
4
5Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
6
7
8commit 7fd6273c25569fe4f37ad371532d93e5170e51f7
9Author: Neil Roberts <neil@linux.intel.com>
10Date: Mon Oct 11 16:16:45 2010 +0100
11
12 tests: Generate the stub scripts using sed
13
14 Instead of trying to run ./test-conformance with the -l option to
15 generate a list of available tests it now runs sed on the
16 test-conform-main.c file instead. Running the generated executable is
17 a pain for cross-compiling so it would be nice to avoid it unless it's
18 absolutely necessary. Although you could tell people who are cross
19 compiling to just disable the conformance tests, this seems a shame
20 because they could still be useful along with the wrappers for example
21 if the cross compile is built to a shared network folder where the
22 tests can be run on the actual device.
23
24 The sed script is a little more ugly than it could be because it tries
25 to avoid using the GNU extensions '\+' and '\|'.
26
27 The script ends up placing restrictions on the format of the C file
28 because the tests must all be listed on one line each. There is now a
29 comment to explain this. Hopefully the trade off is worth it.
30
31 http://bugzilla.clutter-project.org/show_bug.cgi?id=2363
32
33Upstream-Status: Backport
34
35diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am
36index 3036639..1e723e7 100644
37--- a/tests/conform/Makefile.am
38+++ b/tests/conform/Makefile.am
39@@ -89,9 +89,11 @@ test_conformance_SOURCES = $(common_sources) $(units_sources)
40
41 wrappers: stamp-test-conformance
42 @true
43-stamp-test-conformance: Makefile test-conformance$(EXEEXT)
44+stamp-test-conformance: Makefile $(srcdir)/test-conform-main.c
45 @mkdir -p wrappers
46- @( $(abs_builddir)/test-conformance$(EXEEXT) -l -m thorough | $(GREP) '^/' ) > unit-tests
47+ @sed -n -e 's/^ \{1,\}TEST_CONFORM_SIMPLE *(.*"\([^",]\{1,\}\)", *\([a-zA-Z0-9_]\{1,\}\).*/\/conform\1\/\2/p' \
48+ -e 's/^ \{1,\}TEST_CONFORM_SKIP *(.*"\([^",]\{1,\}\)", *\([a-zA-Z0-9_]\{1,\}\).*/\/conform\1\/\2/p' \
49+ $(srcdir)/test-conform-main.c > unit-tests
50 @chmod +x test-launcher.sh
51 @( echo "/stamp-test-conformance" ; \
52 echo "/test-conformance" ; \
53diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c
54index a8b3cf8..2ae7a04 100644
55--- a/tests/conform/test-conform-main.c
56+++ b/tests/conform/test-conform-main.c
57@@ -92,6 +92,11 @@ main (int argc, char **argv)
58 {
59 clutter_test_init (&argc, &argv);
60
61+ /* This file is run through a sed script during the make step so the
62+ lines containing the tests need to be formatted on a single line
63+ each. To comment out a test use the SKIP or TODO macros. Using
64+ #if 0 would break the script. */
65+
66 TEST_CONFORM_SIMPLE ("/timeline", test_timeline);
67 TEST_CONFORM_SKIP (!g_test_slow (), "/timeline", test_timeline_interpolate);
68 TEST_CONFORM_SKIP (!g_test_slow (), "/timeline", test_timeline_rewind);