Changeset 221376 in webkit


Ignore:
Timestamp:
Aug 30, 2017 10:18:09 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[Win][JSCOnly] Support running JSC tests for win-cairo from windows command prompt
https://bugs.webkit.org/show_bug.cgi?id=174985

Patch by Stephan Szabo <stephan.szabo@sony.com> on 2017-08-30
Reviewed by Keith Miller.

  • Scripts/run-javascriptcore-tests:
  • Scripts/run-jsc-stress-tests:
  • Scripts/webkitruby/jsc-stress-test-writer-default.rb:
  • Scripts/webkitruby/jsc-stress-test-writer-ruby.rb: Added.
Location:
trunk/Tools
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r221371 r221376  
     12017-08-30  Stephan Szabo  <stephan.szabo@sony.com>
     2
     3        [Win][JSCOnly] Support running JSC tests for win-cairo from windows command prompt
     4        https://bugs.webkit.org/show_bug.cgi?id=174985
     5
     6        Reviewed by Keith Miller.
     7
     8        * Scripts/run-javascriptcore-tests:
     9        * Scripts/run-jsc-stress-tests:
     10        * Scripts/webkitruby/jsc-stress-test-writer-default.rb:
     11        * Scripts/webkitruby/jsc-stress-test-writer-ruby.rb: Added.
     12
    1132017-08-30  Adrian Perez de Castro  <aperez@igalia.com>
    214
  • trunk/Tools/Scripts/run-javascriptcore-tests

    r219984 r221376  
    5353my $shellRunner;
    5454my $makeRunner;
     55my $rubyRunner;
     56my $testWriter;
    5557my $memoryLimited;
    5658
     
    201203                                In general the shell runner is slower than the make runner.
    202204  --make-runner                 Uses the faster make-based runner.
     205  --ruby-runner                 Uses the ruby runner for machines without unix shell or make.
     206 
     207  --test-writer [writer]        Specifies the test script format."
     208                                default is to use shell scripts to run the tests"
     209                                \"ruby\" to use ruby scripts for systems without a unix shell.
    203210
    204211  --memory-limited              Indicate that we are targeting the test for a memory limited device.
     
    248255    'shell-runner' => \$shellRunner,
    249256    'make-runner' => \$makeRunner,
     257    'ruby-runner' => \$rubyRunner,
     258    'test-writer=s' => \$testWriter,
    250259    'memory-limited' => \$memoryLimited,
    251260    'filter=s' => \$filter,
     
    470479    }
    471480
     481    if ($rubyRunner) {
     482        push(@jscStressDriverCmd, "--ruby-runner");
     483    }
     484
     485    if ($testWriter) {
     486        push(@jscStressDriverCmd, "--test-writer");
     487        push(@jscStressDriverCmd, $testWriter);
     488    }
     489
    472490    if ($memoryLimited) {
    473491        push(@jscStressDriverCmd, "--memory-limited");
  • trunk/Tools/Scripts/run-jsc-stress-tests

    r220431 r221376  
    109109$copyVM = false
    110110$testRunnerType = nil
     111$testWriter = "default"
    111112$remoteUser = nil
    112113$remoteHost = nil
     
    143144    puts "                            In general the shell runner is slower than the make runner."
    144145    puts "--make-runner               Uses the faster make-based runner."
     146    puts "--ruby-runner               Uses the ruby runner for machines without unix shell or make."
     147    puts "--test-writer [writer]      Specifies the test script format."
     148    puts "                            default is to use shell scripts to run the tests"
     149    puts "                            \"ruby\" to use ruby scripts for systems without a unix shell."
    145150    puts "--remote                    Specify a remote host on which to run tests from command line argument."
    146151    puts "--remote-config-file        Specify a remote host on which to run tests from JSON file."
     
    172177               ['--shell-runner', GetoptLong::NO_ARGUMENT],
    173178               ['--make-runner', GetoptLong::NO_ARGUMENT],
     179               ['--ruby-runner', GetoptLong::NO_ARGUMENT],
     180               ['--test-writer', GetoptLong::REQUIRED_ARGUMENT],
    174181               ['--remote', GetoptLong::REQUIRED_ARGUMENT],
    175182               ['--remote-config-file', GetoptLong::REQUIRED_ARGUMENT],
     
    211218    when '--make-runner'
    212219        $testRunnerType = :make
     220    when '--ruby-runner'
     221        $testRunnerType = :ruby
     222    when '--test-writer'
     223        $testWriter = arg
    213224    when '--remote'
    214225        $copyVM = true
     
    424435end
    425436
     437if $testWriter
     438    if /[^-a-zA-Z0-9_]/.match($testWriter)
     439        raise "Invalid test writer #{$testWriter} given"
     440    end
     441end
     442
    426443$numFailures = 0
    427444$numPasses = 0
     
    435452FTL_OPTIONS = ["--useFTLJIT=true"]
    436453
    437 require_relative "webkitruby/jsc-stress-test-writer-default"
     454require_relative "webkitruby/jsc-stress-test-writer-#{$testWriter}"
    438455
    439456def shouldCollectContinuously?
     
    16271644    when :shell
    16281645        prepareShellTestRunner
     1646    when :ruby
     1647        prepareRubyTestRunner
    16291648    else
    16301649        raise "Unknown test runner type: #{$testRunnerType.to_s}"
  • trunk/Tools/Scripts/webkitruby/jsc-stress-test-writer-default.rb

    r220431 r221376  
    345345end
    346346
     347def prepareRubyTestRunner
     348    File.open($runnerDir + "runscript", "w") {
     349        | outp |
     350        $runlist.each {
     351            | plan |
     352            outp.puts "print `sh test_script_#{plan.index} 2>&1`"
     353        }
     354    }
     355end
     356
    347357def testRunnerCommand
    348358    case $testRunnerType
     
    351361    when :make
    352362        command = "make -j #{$numChildProcesses.to_s} -s -f Makefile"
     363    when :ruby
     364        command = "ruby runscript"
    353365    else
    354366        raise "Unknown test runner type: #{$testRunnerType.to_s}"
Note: See TracChangeset for help on using the changeset viewer.