Title: [134924] trunk/Tools
Revision
134924
Author
pe...@chromium.org
Date
2012-11-16 03:23:11 -0800 (Fri, 16 Nov 2012)

Log Message

Running TestWebKitAPI and webkit_unit_tests for Chromium Android should defer to the Chromium-sided test runner
https://bugs.webkit.org/show_bug.cgi?id=102245

Reviewed by Tony Chang.

When running TestWebKitAPI and webkit_unit_test for Chromium Android, defer
the actual running part to the test runner which lives on the Chromium side.
Re-implementing or even generalizing the device-interaction part in WebKit
is error prone and not worth the effort.

* Scripts/run-api-tests:
* Scripts/run-chromium-webkit-unit-tests:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (134923 => 134924)


--- trunk/Tools/ChangeLog	2012-11-16 11:11:07 UTC (rev 134923)
+++ trunk/Tools/ChangeLog	2012-11-16 11:23:11 UTC (rev 134924)
@@ -1,3 +1,18 @@
+2012-11-16  Peter Beverloo  <pe...@chromium.org>
+
+        Running TestWebKitAPI and webkit_unit_tests for Chromium Android should defer to the Chromium-sided test runner
+        https://bugs.webkit.org/show_bug.cgi?id=102245
+
+        Reviewed by Tony Chang.
+
+        When running TestWebKitAPI and webkit_unit_test for Chromium Android, defer
+        the actual running part to the test runner which lives on the Chromium side.
+        Re-implementing or even generalizing the device-interaction part in WebKit
+        is error prone and not worth the effort.
+
+        * Scripts/run-api-tests:
+        * Scripts/run-chromium-webkit-unit-tests:
+
 2012-11-15  Yury Semikhatsky  <yu...@chromium.org>
 
         Memory instrumentation: add code for reporting stack traces of unknown instrumented objects

Modified: trunk/Tools/Scripts/run-api-tests (134923 => 134924)


--- trunk/Tools/Scripts/run-api-tests	2012-11-16 11:11:07 UTC (rev 134923)
+++ trunk/Tools/Scripts/run-api-tests	2012-11-16 11:23:11 UTC (rev 134924)
@@ -79,6 +79,19 @@
 }
 
 setConfiguration();
+
+# When running TestWebKitAPI for Chromium on Android, defer to the test runner in
+# Chromium as we can't execute the binary locally.
+if (isChromiumAndroid()) {
+    my @runTestCommand = ('build/android/run_tests.py', '--verbose', '--webkit', '--out-directory', sourceDir() . '/out', '-s', 'TestWebKitAPI');
+    if (configuration() eq "Release") {
+        push @runTestCommand, '--release';
+    }
+
+    chdir(sourceDir() . '/Source/WebKit/chromium') or die $!;
+    exit exitStatus(system(@runTestCommand));
+}
+
 buildTestTool() if $build;
 setPathForRunningWebKitApp(\%ENV);
 my @testsToRun = listAllTests();

Modified: trunk/Tools/Scripts/run-chromium-webkit-unit-tests (134923 => 134924)


--- trunk/Tools/Scripts/run-chromium-webkit-unit-tests	2012-11-16 11:11:07 UTC (rev 134923)
+++ trunk/Tools/Scripts/run-chromium-webkit-unit-tests	2012-11-16 11:23:11 UTC (rev 134924)
@@ -34,7 +34,19 @@
 use webkitdirs;
 use VCSUtils;
 
+setConfiguration();
+
+# Defer to Android's test runners for running webkit_unit_tests on a device.
+if (checkForArgumentAndRemoveFromARGV('--platform=chromium-android')) {
+    my @runTestCommand = ('build/android/run_tests.py', '--verbose', '--webkit', '--out-directory', sourceDir() . '/out', '-s', 'webkit_unit_tests');
+    if (configuration() eq "Release") {
+        push @runTestCommand, '--release';
+    }
+
+    chdir(sourceDir() . '/Source/WebKit/chromium') or die $!;
+    exit exitStatus(system(@runTestCommand));
+}
+
 push(@ARGV, "--chromium");
-setConfiguration();
 my $pathToBinary = productDir() . "/webkit_unit_tests";
 exit exitStatus(system ($pathToBinary, @ARGV));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to