Changeset 247781 in webkit


Ignore:
Timestamp:
Jul 24, 2019 11:07:01 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

run-javascriptcore-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 <zhifei_fang@apple.com> 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-javascriptcore-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):

Location:
trunk/Tools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/steps.py

    r247428 r247781  
    332332    def start(self):
    333333        platform = self.getProperty('platform')
     334        architecture = self.getProperty("architecture")
     335        # Currently run-javascriptcore-test doesn't support run javascript core test binaries list below remotely
     336        if architecture in ['mips', 'armv7', 'aarch64']:
     337            self.command += ['--no-testmasm', '--no-testair', '--no-testb3', '--no-testdfg', '--no-testapi']
    334338        # Linux bots have currently problems with JSC tests that try to use large amounts of memory.
    335339        # Check: https://bugs.webkit.org/show_bug.cgi?id=175140
     
    345349    def countFailures(self, cmd):
    346350        logText = cmd.logs['stdio'].getText()
     351        count = 0
    347352
    348353        match = re.search(r'^Results for JSC stress tests:\r?\n\s+(\d+) failure', logText, re.MULTILINE)
    349354        if match:
    350             return int(match.group(1))
     355            count += int(match.group(1))
     356
     357        match = re.search(r'Results for JSC test binaries:\r?\n\s+(\d+) failure', logText, re.MULTILINE)
     358        if match:
     359            count += int(match.group(1))
    351360
    352361        match = re.search(r'^Results for Mozilla tests:\r?\n\s+(\d+) regression', logText, re.MULTILINE)
    353362        if match:
    354             return int(match.group(1))
    355 
    356         return 0
     363            count += int(match.group(1))
     364
     365        return count
    357366
    358367
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/steps_unittest.py

    r247428 r247781  
    123123    5 failures found.""")
    124124
     125    def test_jsc_stress_failures_with_binary_results_output(self):
     126        self.assertResults(FAILURE, ["8 JSC tests failed"], 1,  """Results for JSC stress tests:
     127    5 failures found.
     128Results for JSC test binaries:
     129    3 failures found.""")
     130
     131    def test_jsc_stress_failures_with_binary_result_output(self):
     132        self.assertResults(FAILURE, ["6 JSC tests failed"], 1,  """Results for JSC stress tests:
     133    5 failures found.
     134Results for JSC test binaries:
     135    1 failure found.""")
     136
    125137
    126138class RunTest262TestsTest(unittest.TestCase):
  • trunk/Tools/ChangeLog

    r247780 r247781  
     12019-07-24  Zhifei Fang  <zhifei_fang@apple.com>
     2
     3        run-javascriptcore-tests won't report test results for testmasm, testair, testb3, testdfg and test api
     4        https://bugs.webkit.org/show_bug.cgi?id=199489
     5
     6        Reviewed by Aakash Jain.
     7
     8        * BuildSlaveSupport/build.webkit.org-config/steps.py:
     9        (RunJavaScriptCoreTests.start): Skip run jsc test binaries for mips, armv7, aarch64.
     10        (RunJavaScriptCoreTests.countFailures): Pick up the test binaires failure to total failures count
     11        * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
     12        * Scripts/run-javascriptcore-tests: The script now failed wether the run-jsc-stress-tests failed or test binaries failed.
     13        (runTest): Record test binary failure
     14        (reportTestFailures): Report test binary failure
     15        (runJSCStressTests):
     16        * Scripts/webkitpy/common/config/ports.py: Skip run jsc test binaries for those need to run remotely
     17        (JscOnlyPort.build_jsc_command):
     18        (JscOnlyPort):
     19        (JscOnlyPort.run_javascriptcore_tests_command):
     20        * Scripts/webkitpy/common/config/ports_unittest.py:
     21        (DeprecatedPortTest.test_jsconly_port):
     22
    1232019-07-24  Zalan Bujtas  <zalan@apple.com>
    224
  • trunk/Tools/Scripts/run-javascriptcore-tests

    r247428 r247781  
    9393my $failFast = 1;
    9494my %jsonData = ();
     95my @testResults = ();
     96my $isTestFailed = 0;
    9597my $remoteConfigFile;
    9698my $jsonFileName;
     
    234236  --make-runner                 Uses the faster make-based runner.
    235237  --ruby-runner                 Uses the ruby runner for machines without unix shell or make.
    236  
     238
    237239  --test-writer [writer]        Specifies the test script format."
    238240                                default is to use shell scripts to run the tests"
     
    399401    print "$testName completed with rc=$testResult ($exitStatus)\n\n";
    400402
     403    if ($testResult) {
     404        $isTestFailed = 1;
     405        push @testResults, $testName;
     406    }
    401407    if (defined($jsonFileName)) {
    402408        my $testStatus = ($exitStatus == 0)? JSON::PP::true: JSON::PP::false;
     
    405411
    406412    if ($testResult && $failFast) {
     413        reportTestFailures();
    407414        writeJsonDataIfApplicable();
    408415        exit exitStatus($testResult);
    409416    }
     417}
     418
     419sub reportTestFailures {
     420  my $numJSCtestFailures = @testResults;
     421  if ($numJSCtestFailures) {
     422      print "\n** The following JSC test binaries failures have been introduced:\n";
     423      foreach my $testFailure (@testResults) {
     424          print "\t$testFailure\n";
     425      }
     426  }
     427  print "\n";
     428
     429  print "Results for JSC test binaries:\n";
     430  printThingsFound($numJSCtestFailures, "failure", "failures", "found");
     431  print "    OK.\n" if $numJSCtestFailures == 0;
     432
     433  print "\n";
    410434}
    411435
     
    421445
    422446runJSCStressTests();
     447reportTestFailures();
     448
     449if ($isTestFailed) {
     450  exit(1);
     451}
    423452
    424453sub runJSCStressTests
     
    474503        push(@jscStressDriverCmd, "--debug");
    475504    }
    476    
     505
    477506    if (!$copyJSC) {
    478507        push(@jscStressDriverCmd, "--no-copy");
     
    574603
    575604    if ($numJSCStressFailures) {
     605        $isTestFailed = 1;
    576606        print "\n** The following JSC stress test failures have been introduced:\n";
    577607        foreach my $testFailure (@jscStressFailList) {
     
    592622
    593623    writeJsonDataIfApplicable();
    594     exit(1) if $numJSCStressFailures;
    595624}
    596625
  • trunk/Tools/Scripts/webkitpy/common/config/ports.py

    r237089 r247781  
    244244        command.append("--jsc-only")
    245245        return self._append_build_style_flag(command, build_style)
     246
     247    def run_javascriptcore_tests_command(self, build_style=None):
     248        command = self.script_shell_command("run-javascriptcore-tests")
     249        command.append("--no-fail-fast")
     250        command.append("--no-testmasm")
     251        command.append("--no-testair")
     252        command.append("--no-testb3")
     253        command.append("--no-testdfg")
     254        command.append("--no-testapi")
     255        if 'JSCTESTS_OPTIONS' in os.environ:
     256            command += os.environ['JSCTESTS_OPTIONS'].split()
     257        return self._append_build_style_flag(command, build_style)
  • trunk/Tools/Scripts/webkitpy/common/config/ports_unittest.py

    r232789 r247781  
    6868        self.assertEqual(JscOnlyPort().build_jsc_command(build_style="release"), DeprecatedPort().script_shell_command("build-jsc") + ["--jsc-only", "--release"])
    6969        self.assertEqual(JscOnlyPort().build_jsc_command(build_style="debug"), DeprecatedPort().script_shell_command("build-jsc") + ["--jsc-only", "--debug"])
     70        self.assertEqual(JscOnlyPort().run_javascriptcore_tests_command(build_style="debug"), DeprecatedPort().script_shell_command("run-javascriptcore-tests") + ['--no-fail-fast', '--no-testmasm', '--no-testair', '--no-testb3', '--no-testdfg', '--no-testapi', '--debug'])
Note: See TracChangeset for help on using the changeset viewer.