Title: [149309] trunk/Tools
- Revision
- 149309
- Author
- [email protected]
- Date
- 2013-04-29 13:17:18 -0700 (Mon, 29 Apr 2013)
Log Message
[GTK] Set up the TestWebCore in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=115237
Reviewed by Gustavo Noronha Silva.
Set up the WebCore unit test program, consisting of the unit tests under the TestWebKitAPI/Tests/WebCore directory.
Again the approach of specifying libtool libraries multiple times in the TestWebCore program's LDFLAGS is used as
a workaround for the layer violations and circular dependencies between various static libraries. Linking against
either libwebkitgtk or libwebkit2gtk shared libraries is avoided due to the unit tests covering WebCore, which
shouldn't rely on neither of the two distributable libraries (hence the dirty workaround).
* TestWebKitAPI/GNUmakefile.am:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (149308 => 149309)
--- trunk/Tools/ChangeLog 2013-04-29 20:16:12 UTC (rev 149308)
+++ trunk/Tools/ChangeLog 2013-04-29 20:17:18 UTC (rev 149309)
@@ -1,5 +1,20 @@
2013-04-29 Zan Dobersek <[email protected]>
+ [GTK] Set up the TestWebCore in TestWebKitAPI
+ https://bugs.webkit.org/show_bug.cgi?id=115237
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Set up the WebCore unit test program, consisting of the unit tests under the TestWebKitAPI/Tests/WebCore directory.
+ Again the approach of specifying libtool libraries multiple times in the TestWebCore program's LDFLAGS is used as
+ a workaround for the layer violations and circular dependencies between various static libraries. Linking against
+ either libwebkitgtk or libwebkit2gtk shared libraries is avoided due to the unit tests covering WebCore, which
+ shouldn't rely on neither of the two distributable libraries (hence the dirty workaround).
+
+ * TestWebKitAPI/GNUmakefile.am:
+
+2013-04-29 Zan Dobersek <[email protected]>
+
[GTK] Set up the TestJavaScriptCore in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=115236
Modified: trunk/Tools/TestWebKitAPI/GNUmakefile.am (149308 => 149309)
--- trunk/Tools/TestWebKitAPI/GNUmakefile.am 2013-04-29 20:16:12 UTC (rev 149308)
+++ trunk/Tools/TestWebKitAPI/GNUmakefile.am 2013-04-29 20:17:18 UTC (rev 149309)
@@ -22,6 +22,7 @@
noinst_PROGRAMS += \
Programs/TestWebKitAPI/TestWTF \
Programs/TestWebKitAPI/TestJavaScriptCore \
+ Programs/TestWebKitAPI/TestWebCore \
Programs/TestWebKitAPI/TestGtk
if ENABLE_WEBKIT2
@@ -91,6 +92,99 @@
Programs_TestWebKitAPI_TestJavaScriptCore_SOURCES = \
Tools/TestWebKitAPI/Tests/_javascript_Core/VMInspector.cpp
+Programs_TestWebKitAPI_TestWebCore_CPPFLAGS = \
+ $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS)
+
+Programs_TestWebKitAPI_TestWebCore_CXXFLAGS = \
+ $(global_cxxflags)
+
+Programs_TestWebKitAPI_TestWebCore_LDADD = \
+ Libraries/libTestWebKitAPIMain.la \
+ Libraries/libgtest.la \
+ libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@[email protected] \
+ libWTF.la
+
+# FIXME: Due to layer violations and circular dependencies all these libraries have to be specified multiple times
+# when invoking the linker. This ensures any undefined symbols are resolved when linking. See wkb.ug/114901 for more detail.
+# First time around these libraries are simply listed by their file name that's later resolved to the path of the *.a archive
+# (i.e. .libs/libPlatformGtk2.a) by libtool.
+Programs_TestWebKitAPI_TestWebCore_LDADD += \
+ libPlatformGtk.la \
+ libWebCoreGtk.la \
+ libPlatform.la \
+ libWebCorePlatform.la \
+ libWebCore.la \
+ libWebCoreModules.la
+if ENABLE_INDEXED_DATABASE
+Programs_TestWebKitAPI_TestWebCore_LDADD += \
+ libLevelDB.la
+endif
+if USE_OPENGL
+Programs_TestWebKitAPI_TestWebCore_LDADD += \
+ libANGLE.la
+endif
+if ENABLE_SVG
+Programs_TestWebKitAPI_TestWebCore_LDADD += \
+ libWebCoreSVG.la
+endif
+
+# FIXME: Second time around all the libraries are relisted, this time in the -lNAME form. Listed items are resolved into the
+# absolute paths to the *.a archive (i.e. $(abs_builddir)/.libs.libPlatformGtk2.a) by libtool.
+Programs_TestWebKitAPI_TestWebCore_LDADD += \
+ -lPlatformGtk -lWebCoreGtk -lPlatform -lWebCorePlatform -lWebCore -lWebCoreModules
+if ENABLE_INDEXED_DATABASE
+Programs_TestWebKitAPI_TestWebCore_LDADD += \
+ -lLevelDB
+endif
+if USE_OPENGL
+Programs_TestWebKitAPI_TestWebCore_LDADD += \
+ -lANGLE
+endif
+if ENABLE_SVG
+Programs_TestWebKitAPI_TestWebCore_LDADD += \
+ -lWebCoreSVG
+endif
+
+# FIXME: To make the matter worse, these four libraries are again required to be listed for linking. This time they're added by
+# specifying the symbolic link that points back to the ./lib*.la libtool archives which are again resolved into paths to the
+# *.a archives (i.e. .libs/libPlatformGtk2.la) by libtool. Phony targets are added for these files to prevent Automake to try
+# to build them as these symlinks are just a byproduct of libtool.
+.PHONY : .libs/libPlatformGtk.la .libs/libWebCoreGtk.la .libs/libPlatform.la .libs/libWebCorePlatform.la
+Programs_TestWebKitAPI_TestWebCore_LDADD += \
+ .libs/libWebCoreGtk.la .libs/libPlatformGtk.la .libs/libPlatform.la .libs/libWebCorePlatform.la
+
+Programs_TestWebKitAPI_TestWebCore_LDADD += \
+ $(CAIRO_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(GAMEPAD_LIBS) \
+ $(GEOCLUE_LIBS) \
+ $(GAIL_LIBS) \
+ $(GLIB_LIBS) \
+ $(GSTREAMER_LIBS) \
+ $(GTK_LIBS) \
+ $(JPEG_LIBS) \
+ $(LIBSECRET_LIBS) \
+ $(LIBSOUP_LIBS) \
+ $(LIBXML_LIBS) \
+ $(LIBXSLT_LIBS) \
+ $(OPENGL_LIBS) \
+ $(PANGO_LIBS) \
+ $(PNG_LIBS) \
+ $(SQLITE3_LIBS) \
+ $(UNICODE_LIBS) \
+ $(WEBP_LIBS) \
+ $(XRENDER_LIBS) \
+ $(XT_LIBS) \
+ $(ZLIB_LIBS)
+
+Programs_TestWebKitAPI_TestWebCore_LDFLAGS = \
+ -no-install \
+ -no-fast-install
+
+Programs_TestWebKitAPI_TestWebCore_SOURCES = \
+ Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp \
+ Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
+
Programs_TestWebKitAPI_TestGtk_CPPFLAGS = \
$(Programs_TestWebKitAPI_TestWTF_CPPFLAGS) \
$(platformgtk_cppflags) \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes