Changeset 232603 in webkit


Ignore:
Timestamp:
Jun 7, 2018 3:07:37 PM (6 years ago)
Author:
mark.lam@apple.com
Message:

Enhance run-jsc-stress-tests to allow a test to specify test specific options required for it to run.
https://bugs.webkit.org/show_bug.cgi?id=186409
<rdar://problem/40909007>

Reviewed by Saam Barati.

Tools:

This is needed because some tests are written with specific features in mind, and
we may not necessarily want to enable that option for all tests.

We can now specify something like this at the top of a test file:

@ requireOptions("--useIntlPluralRules=true")

... and ensure that that test will be run with the --useIntlPluralRules=true
option for all test configurations that run the test.

  • Scripts/run-jsc-stress-tests:

LayoutTests:

  • js/script-tests/intl-pluralrules.js:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r232591 r232603  
     12018-06-07  Mark Lam  <mark.lam@apple.com>
     2
     3        Enhance run-jsc-stress-tests to allow a test to specify test specific options required for it to run.
     4        https://bugs.webkit.org/show_bug.cgi?id=186409
     5        <rdar://problem/40909007>
     6
     7        Reviewed by Saam Barati.
     8
     9        * js/script-tests/intl-pluralrules.js:
     10
    1112018-06-07  Ryosuke Niwa  <rniwa@webkit.org>
    212
  • trunk/LayoutTests/js/script-tests/intl-pluralrules.js

    r231892 r232603  
    11//@ skip if $hostOS == "windows" or $hostOS == "linux"
     2//@ requireOptions("--useIntlPluralRules=true")
     3
    24description("This test checks the behavior of Intl.PluralRules as described in the ECMAScript Internationalization API Specification.");
    35
  • trunk/Tools/ChangeLog

    r232593 r232603  
     12018-06-07  Mark Lam  <mark.lam@apple.com>
     2
     3        Enhance run-jsc-stress-tests to allow a test to specify test specific options required for it to run.
     4        https://bugs.webkit.org/show_bug.cgi?id=186409
     5        <rdar://problem/40909007>
     6
     7        Reviewed by Saam Barati.
     8
     9        This is needed because some tests are written with specific features in mind, and
     10        we may not necessarily want to enable that option for all tests.
     11
     12        We can now specify something like this at the top of a test file:
     13            //@ requireOptions("--useIntlPluralRules=true")
     14
     15        ... and ensure that that test will be run with the --useIntlPluralRules=true
     16        option for all test configurations that run the test.
     17
     18        * Scripts/run-jsc-stress-tests:
     19
    1202018-06-07  Tim Horton  <timothy_horton@apple.com>
    221
  • trunk/Tools/Scripts/run-jsc-stress-tests

    r231122 r232603  
    504504
    505505$runCommandOptions = {}
     506$testSpecificRequiredOptions = []
    506507
    507508$uniqueFilenameCounter = 0
     
    573574end
    574575
     576def requireOptions(*options)
     577    $testSpecificRequiredOptions += options
     578end
     579
    575580def runWithOutputHandler(kind, outputHandler, *options)
    576     addRunCommand(kind, [pathToVM.to_s] + BASE_OPTIONS + options + [$benchmark.to_s], outputHandler, simpleErrorHandler)
     581    addRunCommand(kind, [pathToVM.to_s] + BASE_OPTIONS + $testSpecificRequiredOptions + options + [$benchmark.to_s], outputHandler, simpleErrorHandler)
    577582end
    578583
     
    915920    prepareExtraRelativeFiles(includeFiles.map { |f| "../" + f }, $collection)
    916921
    917     args = [pathToVM.to_s] + BASE_OPTIONS
     922    args = [pathToVM.to_s] + BASE_OPTIONS + $testSpecificRequiredOptions
    918923    args << "--exception=" + exception if failsWithException
    919924    args << "--test262-async" if isAsync
     
    957962
    958963def runES6(mode)
    959     args = [pathToVM.to_s] + BASE_OPTIONS + [$benchmark.to_s]
     964    args = [pathToVM.to_s] + BASE_OPTIONS + $testSpecificRequiredOptions + [$benchmark.to_s]
    960965    case mode
    961966    when :normal
     
    10881093    prepareExtraRelativeFiles(extraFiles.map { |f| "../" + f }, $collection)
    10891094
    1090     args = [pathToVM.to_s] + BASE_OPTIONS
     1095    args = [pathToVM.to_s] + BASE_OPTIONS + $testSpecificRequiredOptions
    10911096    args += FTL_OPTIONS if $isFTLPlatform
    10921097    args += EAGER_OPTIONS
     
    11291134    prepareExtraAbsoluteFiles(LAYOUTTESTS_PATH, ["resources/standalone-pre.js", "resources/standalone-post.js"])
    11301135
    1131     args = [pathToVM.to_s] + BASE_OPTIONS + options +
     1136    args = [pathToVM.to_s] + BASE_OPTIONS + $testSpecificRequiredOptions + options +
    11321137        [(Pathname.new("resources") + "standalone-pre.js").to_s,
    11331138         $benchmark.to_s,
     
    12691274    end
    12701275    prepareExtraRelativeFiles(extraFiles.map{|v| (Pathname("..") + v).to_s}, $collection)
    1271     args = [pathToVM.to_s] + BASE_OPTIONS + options + extraFiles.map{|v| v.to_s} + [$benchmark.to_s]
     1276    args = [pathToVM.to_s] + BASE_OPTIONS + $testSpecificRequiredOptions + options + extraFiles.map{|v| v.to_s} + [$benchmark.to_s]
    12721277    case mode
    12731278    when :normal
     
    13391344
    13401345def runNoisyTestImpl(kind, options, additionalEnv)
    1341     addRunCommand(kind, [pathToVM.to_s] + BASE_OPTIONS + options + [$benchmark.to_s], noisyOutputHandler, noisyErrorHandler, *additionalEnv)
     1346    addRunCommand(kind, [pathToVM.to_s] + BASE_OPTIONS + $testSpecificRequiredOptions + options + [$benchmark.to_s], noisyOutputHandler, noisyErrorHandler, *additionalEnv)
    13421347end
    13431348
     
    15371542           
    15381543            $runCommandOptions = {}
     1544            $testSpecificRequiredOptions = []
    15391545            defaultRun unless parseRunCommands
    15401546        }
Note: See TracChangeset for help on using the changeset viewer.