Title: [247781] trunk/Tools
Revision
247781
Author
[email protected]
Date
2019-07-24 11:07:01 -0700 (Wed, 24 Jul 2019)

Log Message

run-_javascript_core-tests won't report test results for testmasm, testair, testb3, testdfg and test api
https://bugs.webkit.org/show_bug.cgi?id=199489

Patch by Zhifei Fang <[email protected]> on 2019-07-24
Reviewed by Aakash Jain.

* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunJavaScriptCoreTests.start): Skip run jsc test binaries for mips, armv7, aarch64.
(RunJavaScriptCoreTests.countFailures): Pick up the test binaires failure to total failures count
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
* Scripts/run-_javascript_core-tests: The script now failed wether the run-jsc-stress-tests failed or test binaries failed.
(runTest): Record test binary failure
(reportTestFailures): Report test binary failure
(runJSCStressTests):
* Scripts/webkitpy/common/config/ports.py: Skip run jsc test binaries for those need to run remotely
(JscOnlyPort.build_jsc_command):
(JscOnlyPort):
(JscOnlyPort.run_javascriptcore_tests_command):
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_jsconly_port):

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/steps.py (247780 => 247781)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/steps.py	2019-07-24 18:04:20 UTC (rev 247780)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/steps.py	2019-07-24 18:07:01 UTC (rev 247781)
@@ -331,6 +331,10 @@
 
     def start(self):
         platform = self.getProperty('platform')
+        architecture = self.getProperty("architecture")
+        # Currently run-_javascript_core-test doesn't support run _javascript_ core test binaries list below remotely
+        if architecture in ['mips', 'armv7', 'aarch64']:
+            self.command += ['--no-testmasm', '--no-testair', '--no-testb3', '--no-testdfg', '--no-testapi']
         # Linux bots have currently problems with JSC tests that try to use large amounts of memory.
         # Check: https://bugs.webkit.org/show_bug.cgi?id=175140
         if platform in ('gtk', 'wpe'):
@@ -344,16 +348,21 @@
 
     def countFailures(self, cmd):
         logText = cmd.logs['stdio'].getText()
+        count = 0
 
         match = re.search(r'^Results for JSC stress tests:\r?\n\s+(\d+) failure', logText, re.MULTILINE)
         if match:
-            return int(match.group(1))
+            count += int(match.group(1))
 
+        match = re.search(r'Results for JSC test binaries:\r?\n\s+(\d+) failure', logText, re.MULTILINE)
+        if match:
+            count += int(match.group(1))
+
         match = re.search(r'^Results for Mozilla tests:\r?\n\s+(\d+) regression', logText, re.MULTILINE)
         if match:
-            return int(match.group(1))
+            count += int(match.group(1))
 
-        return 0
+        return count
 
 
 class RunRemoteJavaScriptCoreTests(RunJavaScriptCoreTests):

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/steps_unittest.py (247780 => 247781)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/steps_unittest.py	2019-07-24 18:04:20 UTC (rev 247780)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/steps_unittest.py	2019-07-24 18:07:01 UTC (rev 247781)
@@ -122,7 +122,19 @@
         self.assertResults(FAILURE, ["5 JSC tests failed"], 1,  """Results for JSC stress tests:
     5 failures found.""")
 
+    def test_jsc_stress_failures_with_binary_results_output(self):
+        self.assertResults(FAILURE, ["8 JSC tests failed"], 1,  """Results for JSC stress tests:
+    5 failures found.
+Results for JSC test binaries:
+    3 failures found.""")
 
+    def test_jsc_stress_failures_with_binary_result_output(self):
+        self.assertResults(FAILURE, ["6 JSC tests failed"], 1,  """Results for JSC stress tests:
+    5 failures found.
+Results for JSC test binaries:
+    1 failure found.""")
+
+
 class RunTest262TestsTest(unittest.TestCase):
     def assertResults(self, expected_result, expected_text, rc, stdio):
         cmd = StubRemoteCommand(rc, stdio)

Modified: trunk/Tools/ChangeLog (247780 => 247781)


--- trunk/Tools/ChangeLog	2019-07-24 18:04:20 UTC (rev 247780)
+++ trunk/Tools/ChangeLog	2019-07-24 18:07:01 UTC (rev 247781)
@@ -1,3 +1,25 @@
+2019-07-24  Zhifei Fang  <[email protected]>
+
+        run-_javascript_core-tests won't report test results for testmasm, testair, testb3, testdfg and test api
+        https://bugs.webkit.org/show_bug.cgi?id=199489
+
+        Reviewed by Aakash Jain.
+
+        * BuildSlaveSupport/build.webkit.org-config/steps.py:
+        (RunJavaScriptCoreTests.start): Skip run jsc test binaries for mips, armv7, aarch64.
+        (RunJavaScriptCoreTests.countFailures): Pick up the test binaires failure to total failures count
+        * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
+        * Scripts/run-_javascript_core-tests: The script now failed wether the run-jsc-stress-tests failed or test binaries failed.
+        (runTest): Record test binary failure
+        (reportTestFailures): Report test binary failure
+        (runJSCStressTests): 
+        * Scripts/webkitpy/common/config/ports.py: Skip run jsc test binaries for those need to run remotely
+        (JscOnlyPort.build_jsc_command):
+        (JscOnlyPort):
+        (JscOnlyPort.run_javascriptcore_tests_command):
+        * Scripts/webkitpy/common/config/ports_unittest.py:
+        (DeprecatedPortTest.test_jsconly_port):
+
 2019-07-24  Zalan Bujtas  <[email protected]>
 
         ASSERTION FAILED: settings().textAutosizingEnabled() && settings().textAutosizingUsesIdempotentMode() in WebCore::Page::recomputeTextAutoSizingInAllFrames()

Modified: trunk/Tools/Scripts/run-_javascript_core-tests (247780 => 247781)


--- trunk/Tools/Scripts/run-_javascript_core-tests	2019-07-24 18:04:20 UTC (rev 247780)
+++ trunk/Tools/Scripts/run-_javascript_core-tests	2019-07-24 18:07:01 UTC (rev 247781)
@@ -92,6 +92,8 @@
 my $remoteHost = 0;
 my $failFast = 1;
 my %jsonData = ();
+my @testResults = ();
+my $isTestFailed = 0;
 my $remoteConfigFile;
 my $jsonFileName;
 my $verbose = 0;
@@ -233,7 +235,7 @@
                                 In general the shell runner is slower than the make runner.
   --make-runner                 Uses the faster make-based runner.
   --ruby-runner                 Uses the ruby runner for machines without unix shell or make.
- 
+
   --test-writer [writer]        Specifies the test script format."
                                 default is to use shell scripts to run the tests"
                                 \"ruby\" to use ruby scripts for systems without a unix shell.
@@ -398,6 +400,10 @@
     my $exitStatus = exitStatus($testResult);
     print "$testName completed with rc=$testResult ($exitStatus)\n\n";
 
+    if ($testResult) {
+        $isTestFailed = 1;
+        push @testResults, $testName;
+    }
     if (defined($jsonFileName)) {
         my $testStatus = ($exitStatus == 0)? JSON::PP::true: JSON::PP::false;
         $jsonData{$jsonTestStatusName} = $testStatus;
@@ -404,11 +410,29 @@
     }
 
     if ($testResult && $failFast) {
+        reportTestFailures();
         writeJsonDataIfApplicable();
         exit exitStatus($testResult);
     }
 }
 
+sub reportTestFailures {
+  my $numJSCtestFailures = @testResults;
+  if ($numJSCtestFailures) {
+      print "\n** The following JSC test binaries failures have been introduced:\n";
+      foreach my $testFailure (@testResults) {
+          print "\t$testFailure\n";
+      }
+  }
+  print "\n";
+
+  print "Results for JSC test binaries:\n";
+  printThingsFound($numJSCtestFailures, "failure", "failures", "found");
+  print "    OK.\n" if $numJSCtestFailures == 0;
+
+  print "\n";
+}
+
 if ($runTestMasm) { runTest("testmasm", "allMasmTestsPassed") }
 if ($runTestAir) { runTest("testair", "allAirTestsPassed") }
 if ($runTestB3) { runTest("testb3", "allB3TestsPassed") }
@@ -420,7 +444,12 @@
 chdirWebKit();
 
 runJSCStressTests();
+reportTestFailures();
 
+if ($isTestFailed) {
+  exit(1);
+}
+
 sub runJSCStressTests
 {
     my $jscStressResultsDir = $productDir . "/jsc-stress-results";
@@ -473,7 +502,7 @@
     if (configuration() eq "Debug") {
         push(@jscStressDriverCmd, "--debug");
     }
-    
+
     if (!$copyJSC) {
         push(@jscStressDriverCmd, "--no-copy");
     }
@@ -573,6 +602,7 @@
     my $numJSCStressFailures = @jscStressFailList;
 
     if ($numJSCStressFailures) {
+        $isTestFailed = 1;
         print "\n** The following JSC stress test failures have been introduced:\n";
         foreach my $testFailure (@jscStressFailList) {
             print "\t$testFailure\n";
@@ -591,7 +621,6 @@
     }
 
     writeJsonDataIfApplicable();
-    exit(1) if $numJSCStressFailures;
 }
 
 sub readAllLines

Modified: trunk/Tools/Scripts/webkitpy/common/config/ports.py (247780 => 247781)


--- trunk/Tools/Scripts/webkitpy/common/config/ports.py	2019-07-24 18:04:20 UTC (rev 247780)
+++ trunk/Tools/Scripts/webkitpy/common/config/ports.py	2019-07-24 18:07:01 UTC (rev 247781)
@@ -243,3 +243,15 @@
         command = self.script_shell_command("build-jsc")
         command.append("--jsc-only")
         return self._append_build_style_flag(command, build_style)
+
+    def run_javascriptcore_tests_command(self, build_style=None):
+        command = self.script_shell_command("run-_javascript_core-tests")
+        command.append("--no-fail-fast")
+        command.append("--no-testmasm")
+        command.append("--no-testair")
+        command.append("--no-testb3")
+        command.append("--no-testdfg")
+        command.append("--no-testapi")
+        if 'JSCTESTS_OPTIONS' in os.environ:
+            command += os.environ['JSCTESTS_OPTIONS'].split()
+        return self._append_build_style_flag(command, build_style)

Modified: trunk/Tools/Scripts/webkitpy/common/config/ports_unittest.py (247780 => 247781)


--- trunk/Tools/Scripts/webkitpy/common/config/ports_unittest.py	2019-07-24 18:04:20 UTC (rev 247780)
+++ trunk/Tools/Scripts/webkitpy/common/config/ports_unittest.py	2019-07-24 18:07:01 UTC (rev 247781)
@@ -67,3 +67,4 @@
         self.assertEqual(JscOnlyPort().build_jsc_command(), DeprecatedPort().script_shell_command("build-jsc") + ["--jsc-only"])
         self.assertEqual(JscOnlyPort().build_jsc_command(build_style="release"), DeprecatedPort().script_shell_command("build-jsc") + ["--jsc-only", "--release"])
         self.assertEqual(JscOnlyPort().build_jsc_command(build_style="debug"), DeprecatedPort().script_shell_command("build-jsc") + ["--jsc-only", "--debug"])
+        self.assertEqual(JscOnlyPort().run_javascriptcore_tests_command(build_style="debug"), DeprecatedPort().script_shell_command("run-_javascript_core-tests") + ['--no-fail-fast', '--no-testmasm', '--no-testair', '--no-testb3', '--no-testdfg', '--no-testapi', '--debug'])
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to