WebKit Bugzilla
Attachment 339566 Details for
Bug 184934
: Detach the old Test262 Runner from the stress tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-184934-20180504145908.patch (text/plain), 16.73 KB, created by
Leo Balter
on 2018-05-04 10:59:10 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Leo Balter
Created:
2018-05-04 10:59:10 PDT
Size:
16.73 KB
patch
obsolete
>Subversion Revision: 231362 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 9535548818fa6b0052ee01fc0b08d7acd7026e10..8ddf3a118d8d605a73aa849e30669351e9d1cc79 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,19 @@ >+2018-04-25 Leo Balter <leonardo.balter@gmail.com> >+ >+ Detach the old Test262 Runner from the stress tests >+ https://bugs.webkit.org/show_bug.cgi?id=184934 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * BuildSlaveSupport/build.webkit.org-config/steps.py: >+ (RunTest262Tests): >+ (RunTest262Tests.countFailures): >+ * BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: >+ * Scripts/import-test262-tests: Removed. >+ * Scripts/run-jsc-stress-tests: >+ * Scripts/test262/Import.pm: >+ (processCLI): >+ > 2018-05-04 Myles C. Maxfield <mmaxfield@apple.com> > > Text shaping in the simple path is flipped in the y direction >diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/steps.py b/Tools/BuildSlaveSupport/build.webkit.org-config/steps.py >index cef7454e9ff740f14d06d33d1a2161907b649500..bfe7ed17813470124f2359d2f279c365682ac6f1 100644 >--- a/Tools/BuildSlaveSupport/build.webkit.org-config/steps.py >+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/steps.py >@@ -359,7 +359,7 @@ class RunTest262Tests(TestWithFailureCount): > description = ["test262-tests running"] > descriptionDone = ["test262-tests"] > failedTestsFormatString = "%d Test262 test%s failed" >- command = ["ruby", "./Tools/Scripts/run-jsc-stress-tests", WithProperties("--%(configuration)s"), "JSTests/test262.yaml"] >+ command = ["perl", "./Tools/Scripts/test262-runner"] > > def start(self): > appendCustomBuildFlags(self, self.getProperty('platform'), self.getProperty('fullPlatform')) >@@ -367,7 +367,7 @@ class RunTest262Tests(TestWithFailureCount): > > def countFailures(self, cmd): > logText = cmd.logs['stdio'].getText() >- matches = re.findall(r'^FAIL:', logText, flags=re.MULTILINE) >+ matches = re.findall(r'^\! NEW FAIL', logText, flags=re.MULTILINE) > if matches: > return len(matches) > return 0 >diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/steps_unittest.py b/Tools/BuildSlaveSupport/build.webkit.org-config/steps_unittest.py >index 1cb77da071ab4e1a66809fa029088f7a58148e09..6cdf5306af036373fa93c660ec1e796260185137 100755 >--- a/Tools/BuildSlaveSupport/build.webkit.org-config/steps_unittest.py >+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/steps_unittest.py >@@ -147,7 +147,7 @@ Running test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length > Running test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default > Running test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default-strict > test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default-strict: ERROR: Unexpected exit code: 0 >-FAIL: test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default-strict >+! NEW FAIL: test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default-strict > """) > > def test_failures_output(self): >@@ -155,10 +155,10 @@ FAIL: test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.j > > Running test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default > test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default: ERROR: Unexpected exit code: 0 >-FAIL: test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default >+! NEW FAIL: test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default > Running test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default-strict > test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default-strict: ERROR: Unexpected exit code: 0 >-FAIL: test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default-strict >+! NEW FAIL: test262.yaml/test262/test/annexB/built-ins/Date/prototype/getYear/length.js.default-strict > """) > > >diff --git a/Tools/Scripts/import-test262-tests b/Tools/Scripts/import-test262-tests >deleted file mode 100755 >index 60c0624dbb6b349f9dab0a91b161dd3eb9189c6a..0000000000000000000000000000000000000000 >--- a/Tools/Scripts/import-test262-tests >+++ /dev/null >@@ -1,306 +0,0 @@ >-#!/usr/bin/env ruby >- >-# Copyright (C) 2016 Apple Inc. All rights reserved. >-# >-# Redistribution and use in source and binary forms, with or without >-# modification, are permitted provided that the following conditions >-# are met: >-# >-# 1. Redistributions of source code must retain the above copyright >-# notice, this list of conditions and the following disclaimer. >-# 2. Redistributions in binary form must reproduce the above copyright >-# notice, this list of conditions and the following disclaimer in the >-# documentation and/or other materials provided with the distribution. >-# >-# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY >-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >-# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY >-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES >-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; >-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND >-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF >-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- >-# Steps to update test262 test resources and yaml: >-# >-# 1. Run importer to update the yaml and test resources. >-# $ import-test262-tests /path/to/test262 >-# 2. Run the tests to produce a list of failures. >-# $ run-jsc-stress-tests JSTests/test262.yaml >-# 3. Run importer to update the yaml with a new list of failures. >-# $ import-test262-tests --failures ./results/failed /path/to/test262 >- >-require 'fileutils' >-require 'getoptlong' >-require 'pathname' >-require 'yaml' >-require 'find' >-require 'shellwords' >- >-THIS_SCRIPT_PATH = Pathname.new(__FILE__).realpath >-SCRIPTS_PATH = THIS_SCRIPT_PATH.dirname >-WEBKIT_PATH = SCRIPTS_PATH.dirname.dirname >-TEST262_YAML_PATH = WEBKIT_PATH + "JSTests/test262.yaml" >-TEST262_REVISION_PATH = WEBKIT_PATH + "JSTests/test262/test262-Revision.txt" >- >-raise unless SCRIPTS_PATH.basename.to_s == "Scripts" >-raise unless SCRIPTS_PATH.dirname.basename.to_s == "Tools" >- >-def usage >- puts "#{File.basename $0} [options] <path-to-test262-repository>" >- puts >- puts "-h, --help print this help message." >- puts "-f, --failures FAILURES Supplied file will be used to determine which tests fail." >- puts " If a failures file is not provided all tests are assumed to pass," >- puts " and test resources are not updated, only the yaml is updated." >- exit 1 >-end >- >-$failures = nil >-JS_TEST_REGEXP = /.*\.js/ >-JS_FIXTURE_REGEXP = /.*(_FIXTURE\.js|_\.js)/ >-GET_YAML_REGEXP = /\/\*---(?<yaml>.*?)---\*\//m >- >-GetoptLong.new(["--help", "-h", GetoptLong::NO_ARGUMENT], >- ["--failures", "-f", GetoptLong::REQUIRED_ARGUMENT]).each { >- | opt, arg | >- case opt >- when "--help" >- usage >- when "--failures" >- $failures = {} >- File.open(Pathname.new(arg)).readlines.each { >- | line | >- match = line.match(/test262\/(.*?\.default.*?$)/) >- if (match) >- $failures[match[1]] = true >- end >- } >- end >-} >- >-def didPassForMode(path, strict) >- if $failures >- if strict == :strict >- return !$failures.key?(path.to_s + ".default-strict") >- else >- return !$failures.key?(path.to_s + ".default") >- end >- else >- return true >- end >-end >- >-class Test >- attr_writer :failsWithException, :isModule, :isAsync >- attr_accessor :includeFiles, :needsStrict, :needsNonStrict >- attr_reader :path >- >- def initialize(path) >- @path = path >- @failsWithException = nil >- @includeFiles = [] >- @needsStrict = true >- @needsNonStrict = true >- @isModule = false >- @isAsync = false >- end >- >- def check >- # Throw an exception here since I'm not sure if the test infrastructure works in these cases. >- raise if !@needsStrict and !@needsNonStrict >- raise if @isModule and !@needsNonStrict >- end >- >- def formatFlags(strict) >- flags = [] >- flags << strict if strict == :strict >- flags << :module if @isModule >- flags << :async if @isAsync >- >- return flags.to_s >- end >- >- def formatCmdArguments(strict) >- raise if strict == :strict ? !@needsStrict : !@needsNonStrict >- passed = didPassForMode(@path, strict) >- cmd = "runTest262" >- cmd += passed ? " :normal, " : " :fail, " >- cmd += @failsWithException ? @failsWithException.inspect : "\"NoException\"" >- cmd += ", #{@includeFiles.inspect}" >- cmd += ", #{formatFlags(strict)}" >- end >- >- def finalizeIncludes >- if @isAsync >- @includeFiles << "doneprintHandle.js" >- end >- >- dir = Pathname.new(".") >- @path.dirname.each_filename { >- | part | >- dir += ".." >- } >- dir += "harness" >- >- @includeFiles.map! { | file | (dir + file).to_s } >- end >- >-end >- >-def processTestFile(path) >- /\/\*---(?<yaml>.*?)---\*\//m =~ File::read(path) >- >- test = Test.new(path) >- # These should be included by all the tests >- test.includeFiles = ["assert.js", "sta.js"] >- >- begin >- yamlElements = YAML::load(yaml) >- rescue Exception => e >- puts "Failed to parse YAML for #{path}, threw exception:" >- puts e.inspect >- end >- yamlElements.each { >- | option | >- case option[0] >- when "negative" >- test.failsWithException = option[1]["type"].to_s >- when "includes" >- test.includeFiles += option[1] >- when "flags" >- option[1].each { >- | flag | >- case flag >- when "raw", "noStrict" >- test.needsStrict = false >- when "onlyStrict" >- test.needsNonStrict = false >- when "module" >- test.isModule = true >- test.needsStrict = false >- when "async" >- test.isAsync = true >- when "generated" >- else >- raise "Invalid Metadata flag option, #{flag}, when parsing #{$benchmarkDirectory + $benchmark}" >- end >- } >- end >- } >- >- test.finalizeIncludes >- test.check >- >- return test >-end >- >-class Fixture >- attr_reader :path, :needsNonStrict, :needsStrict >- >- def initialize(path) >- @path = path >- @needsNonStrict = true >- @needsStrict = false >- end >- >- def formatCmdArguments(strict) >- return "prepareTest262Fixture" >- end >-end >- >-def processFixtureFile(path) >- Fixture.new(path) >-end >- >-def processFilesRecursively(path) >- tests = [] >- >- Dir.chdir(path) { >- Find.find(Pathname.new("test")) { >- | file | >- if File.file?(file) and JS_TEST_REGEXP =~ file.to_s >- path = Pathname.new(file) >- if JS_FIXTURE_REGEXP =~ file.to_s >- tests << processFixtureFile(path) >- else >- tests << processTestFile(path) >- end >- end >- } >- } >- >- return tests >-end >- >-def printYAML(tests) >- File.open(TEST262_YAML_PATH, "w+") { >- | outp | >- outp.puts "---" >- tests.each { >- | test | >- if test.needsNonStrict >- outp.puts "- path: test262/" + test.path.to_s >- outp.puts " cmd: " + test.formatCmdArguments(:nonStrict) >- end >- if test.needsStrict >- outp.puts "- path: test262/" + test.path.to_s >- outp.puts " cmd: " + test.formatCmdArguments(:strict) >- end >- } >- } >-end >- >-def printRevision(test262Path) >- url = "unknown" >- branchname = url >- revision = url >- Dir.chdir(test262Path) { >- tracking = `git rev-parse --abbrev-ref --symbolic-full-name @{u}`.chomp >- remoteName, branchName = tracking.split("/") >- url = `git remote get-url #{remoteName}` >- revision = `git rev-parse HEAD`.strip >- } >- >- File.open(TEST262_REVISION_PATH, "w+") { >- | f | >- puts "test262 remote url: " + url >- puts "test262 revision: " + revision >- f.puts "test262 remote url: " + url >- f.puts "test262 revision: " + revision >- } >-end >- >-def replaceResources(test262Path) >- harnessSource = File.join(test262Path, "harness") >- harnessDestination = File.join(WEBKIT_PATH, "JSTests", "test262", "harness") >- testSource = File.join(test262Path, "test") >- testDestination = File.join(WEBKIT_PATH, "JSTests", "test262", "test") >- >- FileUtils.rm_r harnessDestination.to_s >- FileUtils.cp_r harnessSource.to_s, harnessDestination.to_s >- >- FileUtils.rm_r testDestination.to_s >- FileUtils.cp_r testSource.to_s, testDestination.to_s >-end >- >-if ARGV.empty? >- usage >-end >- >-puts "Writing #{File.basename(TEST262_REVISION_PATH)}..." >-test262Path = Pathname.new(ARGV[0]) >-printRevision(test262Path) >- >-puts "Enumerating tests..." >-tests = processFilesRecursively(test262Path) >- >-puts "Writing #{File.basename(TEST262_YAML_PATH)}..." >-printYAML(tests) >- >-if !$failures >- puts "Replacing test262 resources..." >- replaceResources(test262Path) >-end >diff --git a/Tools/Scripts/run-jsc-stress-tests b/Tools/Scripts/run-jsc-stress-tests >index eb47063d3550f917b12530d54fca57c9108a7f91..a5d3f7ab48a182bee0a8f4b8fe0172fbce96fd1b 100755 >--- a/Tools/Scripts/run-jsc-stress-tests >+++ b/Tools/Scripts/run-jsc-stress-tests >@@ -892,69 +892,6 @@ def runControlFlowProfiler > run("ftl-no-cjit-type-profiler", "--useControlFlowProfiler=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS)) > end > >-def runTest262(mode, exception, includeFiles, flags) >- failsWithException = exception != "NoException" >- isStrict = false >- isModule = false >- isAsync = false >- >- flags.each { >- | flag | >- case flag >- when :strict >- isStrict = true >- when :module >- isModule = true >- when :async >- isAsync = true >- else >- raise "Invalid flag for runTest262, #{flag}" >- end >- } >- >- prepareExtraRelativeFiles(includeFiles.map { |f| "../" + f }, $collection) >- >- args = [pathToVM.to_s] + BASE_OPTIONS >- args << "--exception=" + exception if failsWithException >- args << "--test262-async" if isAsync >- args += includeFiles >- >- case mode >- when :normal >- errorHandler = simpleErrorHandler >- outputHandler = silentOutputHandler >- when :fail >- errorHandler = expectedFailErrorHandler >- outputHandler = noisyOutputHandler >- when :failDueToOutdatedOrBadTest >- errorHandler = expectedFailErrorHandler >- outputHandler = noisyOutputHandler >- when :skip >- return >- else >- raise "Invalid mode: #{mode}" >- end >- >- if isStrict >- kind = "default-strict" >- args << "--strict-file=#{$benchmark}" >- else >- kind = "default" >- if isModule >- args << "--module-file=#{$benchmark}" >- else >- args << $benchmark.to_s >- end >- end >- >- addRunCommand(kind, args, outputHandler, errorHandler) >-end >- >-def prepareTest262Fixture >- # This function is used to add the files used by Test262 modules tests. >- prepareExtraRelativeFiles([""], $collection) >-end >- > def runES6(mode) > args = [pathToVM.to_s] + BASE_OPTIONS + [$benchmark.to_s] > case mode >diff --git a/Tools/Scripts/test262/Import.pm b/Tools/Scripts/test262/Import.pm >index 46bd467916728234095cd4d01bbcc57afa4af7f9..701501102a73ed7ea1a53e865250e3129e502b9e 100755 >--- a/Tools/Scripts/test262/Import.pm >+++ b/Tools/Scripts/test262/Import.pm >@@ -31,11 +31,11 @@ use strict; > use warnings; > package Test262::Import; > >-use Cwd qw/abs_path/; >-use File::Path qw/rmtree/; >-use File::Temp qw/tempdir/; >+use Cwd qw(abs_path); >+use File::Path qw(rmtree); >+use File::Temp qw(tempdir); > use FindBin; >-use Getopt::Long qw/GetOptions/; >+use Getopt::Long qw(GetOptions); > use Pod::Usage; > use Env qw(T262_EXEC_BIN); > >@@ -61,7 +61,7 @@ sub processCLI { > ); > > if ($help) { >- pod2usage(-exitstatus => 0, -verbose => 1); >+ pod2usage(-exitstatus => 0, -verbose => 1, -input => __FILE__); > } > > if ($sourceDir and $remoteUrl) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 184934
:
338795
|
339547
|
339551
|
339554
|
339566
|
339567
|
339984
|
339989
|
340006