[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

kbalazs at webkit.org kbalazs at webkit.org
Wed Dec 22 14:31:40 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ac0410898d58552e4276814b1a7845c8841d1ad0
Author: kbalazs at webkit.org <kbalazs at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 12 14:47:06 2010 +0000

    2010-10-12  Balazs Kelemen  <kbalazs at webkit.org>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt][WTR] Checking the path of the injected bundle is bogus
            https://bugs.webkit.org/show_bug.cgi?id=47541
    
            * WebKitTestRunner/qt/TestControllerQt.cpp:
            (WTR::isExistingLibrary): Added (static helper).
            Extend the path with the appropriate suffix(es) on the
            platform and check that the file exists.
            (WTR::TestController::initializeInjectedBundlePath):
            There were two bugs with the path checking:
                - the condition should have been inverted
                - QLibrary::fileName does not give back the filename
                  with the library suffix so we cannot check
                  that existance of the file this way.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69581 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 3a08342..ea7e3c2 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2010-10-12  Balazs Kelemen  <kbalazs at webkit.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt][WTR] Checking the path of the injected bundle is bogus
+        https://bugs.webkit.org/show_bug.cgi?id=47541
+
+        * WebKitTestRunner/qt/TestControllerQt.cpp:
+        (WTR::isExistingLibrary): Added (static helper).
+        Extend the path with the appropriate suffix(es) on the
+        platform and check that the file exists.
+        (WTR::TestController::initializeInjectedBundlePath):
+        There were two bugs with the path checking:
+            - the condition should have been inverted
+            - QLibrary::fileName does not give back the filename
+              with the library suffix so we cannot check
+              that existance of the file this way.
+
 2010-10-12  Gabor Rapcsanyi  <rgabor at inf.u-szeged.hu>
 
         Reviewed by Tony Chang.
diff --git a/WebKitTools/WebKitTestRunner/qt/TestControllerQt.cpp b/WebKitTools/WebKitTestRunner/qt/TestControllerQt.cpp
index 956a1c8..4accde6 100644
--- a/WebKitTools/WebKitTestRunner/qt/TestControllerQt.cpp
+++ b/WebKitTools/WebKitTestRunner/qt/TestControllerQt.cpp
@@ -33,6 +33,7 @@
 #include <QLibrary>
 #include <QObject>
 #include <QtGlobal>
+#include <wtf/Platform.h>
 #include <wtf/text/WTFString.h>
 
 namespace WTR {
@@ -84,13 +85,31 @@ void TestController::runUntil(bool& done)
     ASSERT(done);
 }
 
+static bool isExistingLibrary(const QString& path)
+{
+#if OS(WINDOWS) || OS(SYMBIAN)
+    const char* librarySuffixes[] = { ".dll" };
+#elif PLATFORM(MAC)
+    const char* librarySuffixes[] = { ".bundle", ".dylib", ".so" };
+#elif OS(UNIX)
+    const char* librarySuffixes[] = { ".so" };
+#else
+#error Library path suffix should be specified for this platform
+#endif
+    for (unsigned i = 0; i < sizeof(librarySuffixes) / sizeof(const char*); ++i) {
+        if (QLibrary::isLibrary(path + librarySuffixes[i]))
+            return true;
+    }
+
+    return false;
+}
+
 void TestController::initializeInjectedBundlePath()
 {
     QString path = QLatin1String(getenv("WTR_INJECTEDBUNDLE_PATH"));
     if (path.isEmpty())
         path = QFileInfo(QCoreApplication::applicationDirPath() + "/../lib/libWTRInjectedBundle").absoluteFilePath();
-
-    if (QLibrary::isLibrary(QLibrary(path).fileName()))
+    if (!isExistingLibrary(path))
         qFatal("Cannot find the injected bundle at %s\n", qPrintable(path));
 
     m_injectedBundlePath = WKStringCreateWithQString(path);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list