Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Enable JSC stress tests for the rest of non-Windows platforms
https://bugs.webkit.org/show_bug.cgi?id=121021

Reviewed by Filip Pizlo.

The JSC stress tests can already be enabled on Linux-based ports.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunJavaScriptCoreTests.commandComplete): Reformulate the regular expressions used to find the number of regressed
JSC tests of various test suites. The expressions now look for the suite-specific report compartment over the
complete output, with the number of failing or crashing tests properly extracted.
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py: Add a couple of unit tests and expand the tested
output in other unit tests testing the parsing of the output in the new format.
(test_jsc_stress_failure_new_output):
(test_fast_js_crashes_and_jsc_stress_failures_new_output):
* Scripts/run-javascriptcore-tests: Enable the JSC stress tests on all but the Apple Win port.
* Scripts/run-jsc-stress-tests: `sysctl -n hw.availcpu` doesn't work on Linux-based ports but the numProcesses
variable is still gracefully assigned a zero value. In that case, try running `nproc --all` to gather the number
of available CPUs so the stress tests can be run in parallel.


Canonical link: https://commits.webkit.org/139030@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
zdobersek committed Sep 10, 2013
1 parent 96507b0 commit 0032fcf
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 13 deletions.
16 changes: 7 additions & 9 deletions Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
Expand Up @@ -260,18 +260,16 @@ class RunJavaScriptCoreTests(shell.Test):
logText = cmd.logs['stdio'].getText()

expressions = [
('failing Mozilla test', re.compile(r'(\d+) regression')),
('failing js test', re.compile(r'(\d+) failure')),
('crashing js test', re.compile(r'(\d+) crash')),
('failing Mozilla test', re.compile(r'^Results for Mozilla tests:\r?\n\s+(\d+) regression', re.MULTILINE)),
('failing js test', re.compile(r'^Results for js tests:\r?\n\s+(\d+) failure', re.MULTILINE)),
('crashing js test', re.compile(r'^Results for js tests:\r?\n.*\n\s+(\d+) crash', re.MULTILINE)),
('failing JSC stress test', re.compile(r'^Results for JSC stress tests:\r?\n\s+(\d+) failure', re.MULTILINE)),
]
resultLines = {}

for line in logText.splitlines():
for name, expression in expressions:
match = expression.search(line)
if match:
resultLines[name] = int(match.group(1))
break
for name, expression in expressions:
match = expression.search(logText)
resultLines[name] = int(match.group(1)) if match else 0

self.regressionLine = []
for name in resultLines:
Expand Down
Expand Up @@ -141,7 +141,11 @@ def test_fast_js_failure_new_output(self):
Results for js tests:
469 failures found.
0 crashes found.""")
0 crashes found.
Results for JSC stress tests:
0 failures found.
OK.""")

def test_fast_js_crash_new_output(self):
self.assertResults(FAILURE, ["jscore-test", '1 crashing js test '], 1, """Results for Mozilla tests:
Expand All @@ -151,7 +155,11 @@ def test_fast_js_crash_new_output(self):
Results for js tests:
0 failures found.
1 crashes found.""")
1 crashes found.
Results for JSC stress tests:
0 failures found.
OK.""")

def test_mozilla_and_fast_js_failure_new_output(self):
self.assertResults(FAILURE, ["jscore-test", '1 failing Mozilla test ', '469 failing js tests '], 1, """Results for Mozilla tests:
Expand All @@ -160,7 +168,37 @@ def test_mozilla_and_fast_js_failure_new_output(self):
Results for js tests:
469 failures found.
0 crashes found.""")
0 crashes found.
Results for JSC stress tests:
0 failures found.
OK.""")

def test_jsc_stress_failure_new_output(self):
self.assertResults(FAILURE, ["jscore-test", '1 failing JSC stress test '], 1, """Results for Mozilla tests:
0 regression found.
0 tests fixed.
Results for js tests:
0 failures found.
0 crashes found.
Results for JSC stress tests:
1 failures found.
OK.""")

def test_js_crashes_and_jsc_stress_failures_new_output(self):
self.assertResults(FAILURE, ["jscore-test", '25 crashing js tests ', '284 failing JSC stress tests '], 1, """Results for Mozilla tests:
0 regression found.
0 tests fixed.
Results for js tests:
0 failures found.
25 crashes found.
Results for JSC stress tests:
284 failures found.
OK.""")


class RunQtAPITestsTest(unittest.TestCase):
Expand Down
22 changes: 22 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,25 @@
2013-09-10 Zan Dobersek <zdobersek@igalia.com>

Enable JSC stress tests for the rest of non-Windows platforms
https://bugs.webkit.org/show_bug.cgi?id=121021

Reviewed by Filip Pizlo.

The JSC stress tests can already be enabled on Linux-based ports.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunJavaScriptCoreTests.commandComplete): Reformulate the regular expressions used to find the number of regressed
JSC tests of various test suites. The expressions now look for the suite-specific report compartment over the
complete output, with the number of failing or crashing tests properly extracted.
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py: Add a couple of unit tests and expand the tested
output in other unit tests testing the parsing of the output in the new format.
(test_jsc_stress_failure_new_output):
(test_fast_js_crashes_and_jsc_stress_failures_new_output):
* Scripts/run-javascriptcore-tests: Enable the JSC stress tests on all but the Apple Win port.
* Scripts/run-jsc-stress-tests: `sysctl -n hw.availcpu` doesn't work on Linux-based ports but the numProcesses
variable is still gracefully assigned a zero value. In that case, try running `nproc --all` to gather the number
of available CPUs so the stress tests can be run in parallel.

2013-09-10 Chris Fleizach <cfleizach@apple.com>

AX: Expose DOM ID and ClassList to AX APIs for automation and AT element hashes
Expand Down
2 changes: 1 addition & 1 deletion Tools/Scripts/run-javascriptcore-tests
Expand Up @@ -78,7 +78,7 @@ my $runFastJS = !isAppleWinWebKit();

# FIXME: run-jsc-stress-tests should be ported to other platforms.
# https://bugs.webkit.org/show_bug.cgi?id=120809
my $runJSCStress = isAppleMacWebKit();
my $runJSCStress = !isAppleWinWebKit();

my $enableFTL = 0;

Expand Down
3 changes: 3 additions & 0 deletions Tools/Scripts/run-jsc-stress-tests
Expand Up @@ -70,6 +70,9 @@ def mysys(*cmd)
end

numProcessors = `sysctl -n hw.availcpu`.to_i
if numProcessors == 0
numProcessors = `nproc --all 2>/dev/null`.to_i
end

$jscPath = nil
$enableFTL = false
Expand Down

0 comments on commit 0032fcf

Please sign in to comment.