generic-poky/meta/recipes-graphics/clutter/clutter/test-conformance-fix.patch

69 lines
3.0 KiB
Diff
Raw Normal View History

Compiling conformance test leads running test-conformance target binary, and
gets failure in cross-compile environment. Introduce this commit from upstream
to fix it.
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
commit 7fd6273c25569fe4f37ad371532d93e5170e51f7
Author: Neil Roberts <neil@linux.intel.com>
Date: Mon Oct 11 16:16:45 2010 +0100
tests: Generate the stub scripts using sed
Instead of trying to run ./test-conformance with the -l option to
generate a list of available tests it now runs sed on the
test-conform-main.c file instead. Running the generated executable is
a pain for cross-compiling so it would be nice to avoid it unless it's
absolutely necessary. Although you could tell people who are cross
compiling to just disable the conformance tests, this seems a shame
because they could still be useful along with the wrappers for example
if the cross compile is built to a shared network folder where the
tests can be run on the actual device.
The sed script is a little more ugly than it could be because it tries
to avoid using the GNU extensions '\+' and '\|'.
The script ends up placing restrictions on the format of the C file
because the tests must all be listed on one line each. There is now a
comment to explain this. Hopefully the trade off is worth it.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2363
recipes: Add Upstream-Status to multiple recipes gtk+: Add Upstream-Status ed: Add Upstream-Status gnome-common: Add Upstream-Status libmatchbox: Add Upstream-Status matchbox-wm: Add Upstream-Status x11vnc: Add Upstream-Status xtscal: Add Upstream-Status eds-dbus: Add Upstream-Status matchbox-desktop: Add Upstream-Status matchbox-keyboard: Add Upstream-Status matchbox-stroke: Add Upstream-Status matchbox-theme-sato: Add Upstream-Status owl-video-widget: Add Upstream-Status beecrypt: Add Upstream-Status gnome-icon-theme: Add Upstream-Status tslib: Add Upstream-Status libowl-av: Add Upstream-Status sato-icon-theme: Add Upstream-Status web-webkit: Add Upstream-Status metacity: Add Upstream-Status apr: Add Upstream-Status gdk-pixbuf: Add Upstream-Status pcmanfm: Add Upstream-Status gpgme: Add Upstream-Status eee-acpi-scripts: Add Upstream-Status libgalago: Add Upstream-Status python-pygtk: Add Upstream-Status gnome-mime-data: Add Upstream-Status clutter: Add Upstream-Status clutter-gtk: Add Upstream-Status tidy: Add Upstream-Status mutter: Add Upstream-Status xcursor-transparent-theme: Add Upstream-Status leafpad: Add Upstream-Status matchbox-config-gtk: Add Upstream-Status contacts: Add Upstream-Status dates: Add Upstream-Status web: Add Upstream-Status webkit: Add Upstream-Status - Also removed empty fix_im.patch apr-util: Add Upstream-Status libcroco: Add Upstream-Status liboil: Add Upstream-Status libxslt: Add Upstream-Status libglade: Add Upstream-Status gnome-terminal: Add Upstream-Status xev: Add Upstream-Status claws-mail: Add Upstream-Status clipboard-manager: Add Upstream-Status epdfview: Add Upstream-Status kf: Add Upstream-Status qemu: Add Upstream-Status clutter-gst: Add Upstream-Status table: Add Upstream-Status matchbox-panel-2: Add Upstream-Status (From OE-Core rev: 10bdb737c2c4c6996fd035849109a1e07580a6b9) Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-12 00:08:05 +00:00
Upstream-Status: Backport
diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am
index 3036639..1e723e7 100644
--- a/tests/conform/Makefile.am
+++ b/tests/conform/Makefile.am
@@ -89,9 +89,11 @@ test_conformance_SOURCES = $(common_sources) $(units_sources)
wrappers: stamp-test-conformance
@true
-stamp-test-conformance: Makefile test-conformance$(EXEEXT)
+stamp-test-conformance: Makefile $(srcdir)/test-conform-main.c
@mkdir -p wrappers
- @( $(abs_builddir)/test-conformance$(EXEEXT) -l -m thorough | $(GREP) '^/' ) > unit-tests
+ @sed -n -e 's/^ \{1,\}TEST_CONFORM_SIMPLE *(.*"\([^",]\{1,\}\)", *\([a-zA-Z0-9_]\{1,\}\).*/\/conform\1\/\2/p' \
+ -e 's/^ \{1,\}TEST_CONFORM_SKIP *(.*"\([^",]\{1,\}\)", *\([a-zA-Z0-9_]\{1,\}\).*/\/conform\1\/\2/p' \
+ $(srcdir)/test-conform-main.c > unit-tests
@chmod +x test-launcher.sh
@( echo "/stamp-test-conformance" ; \
echo "/test-conformance" ; \
diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c
index a8b3cf8..2ae7a04 100644
--- a/tests/conform/test-conform-main.c
+++ b/tests/conform/test-conform-main.c
@@ -92,6 +92,11 @@ main (int argc, char **argv)
{
clutter_test_init (&argc, &argv);
+ /* This file is run through a sed script during the make step so the
+ lines containing the tests need to be formatted on a single line
+ each. To comment out a test use the SKIP or TODO macros. Using
+ #if 0 would break the script. */
+
TEST_CONFORM_SIMPLE ("/timeline", test_timeline);
TEST_CONFORM_SKIP (!g_test_slow (), "/timeline", test_timeline_interpolate);
TEST_CONFORM_SKIP (!g_test_slow (), "/timeline", test_timeline_rewind);