Example #1
0
def _graal_js_gate_runner(args, tasks):
    with Task('CheckCopyrights', tasks, tags=['style']) as t:
        if t:
            if mx.checkcopyrights(['--primary']) != 0:
                t.abort(
                    'Copyright errors found. Please run "mx checkcopyrights --primary -- --fix" to fix them.'
                )

    with Task('TestJSCommand',
              tasks,
              tags=[GraalJsDefaultTags.default, GraalJsDefaultTags.all]) as t:
        if t:
            js(['-Dpolyglot.js.profile-time=true', '-e', '""'])

    with Task('UnitTests',
              tasks,
              tags=[GraalJsDefaultTags.default, GraalJsDefaultTags.all]) as t:
        if t:
            unittest(
                ['--enable-timing', '--very-verbose', '--suite', _suite.name])

    gateTestConfigs = {
        GraalJsDefaultTags.default: ['gate'],
        'noic': [
            '-Dpolyglot.js.property-cache-limit=0',
            '-Dpolyglot.js.function-cache-limit=0', 'gate'
        ],
        'directbytebuffer': ['-Dpolyglot.js.direct-byte-buffer=true', 'gate'],
        'cloneuninitialized':
        ['-Dpolyglot.js.test-clone-uninitialized=true', 'gate'],
        'lazytranslation': ['-Dpolyglot.js.lazy-translation=true', 'gate'],
        'shareengine': ['gate', 'shareengine'],
    }

    gateTestCommands = {
        'Test262': test262,
        'TestNashorn': testnashorn,
        'TestV8': testv8,
    }

    for testCommandName in gateTestCommands:
        for testConfigName in gateTestConfigs:
            testName = '%s-%s' % (testCommandName, testConfigName)
            with Task(testName,
                      tasks,
                      tags=[testName, testConfigName,
                            GraalJsDefaultTags.all]) as t:
                if t:
                    gateTestCommands[testCommandName](
                        gateTestConfigs[testConfigName])

    with Task('TCK tests',
              tasks,
              tags=[GraalJsDefaultTags.all, GraalJsDefaultTags.tck]) as t:
        if t:
            import mx_truffle
            mx_truffle._tck([])
Example #2
0
def _graal_js_gate_runner(args, tasks):
    with Task('CheckCopyrights', tasks, tags=['style']) as t:
        if t:
            if mx.checkcopyrights(['--primary']) != 0:
                t.abort('Copyright errors found. Please run "mx checkcopyrights --primary -- --fix" to fix them.')

    with Task('TestJSCommand', tasks, tags=[GraalJsDefaultTags.default, GraalJsDefaultTags.all]) as t:
        if t:
            js(['-Dpolyglot.js.profile-time=true', '-e', '""'])

    webassemblyTestSuite = 'com.oracle.truffle.js.test.suite.WebAssemblySimpleTestSuite'
    with Task('UnitTests', tasks, tags=[GraalJsDefaultTags.default, GraalJsDefaultTags.all]) as t:
        if t:
            noWebAssemblyTestSuite = '^(?!' + webassemblyTestSuite  + ')'
            commonOptions = ['--enable-timing', '--very-verbose', '--suite', _suite.name]
            unittest(['--regex', noWebAssemblyTestSuite] + commonOptions)
            unittest(['--regex', 'ZoneRulesProviderTest', '-Djava.time.zone.DefaultZoneRulesProvider=com.oracle.truffle.js.test.runtime.SimpleZoneRulesProvider'] + commonOptions)

    with Task('WebAssemblyTests', tasks, tags=['webassembly', GraalJsDefaultTags.all]) as t:
        if t:
            unittest(['--regex', webassemblyTestSuite, '--enable-timing', '--very-verbose', '--suite', _suite.name])

    gateTestConfigs = {
        GraalJsDefaultTags.default: ['gate'],
        'noic': ['-Dpolyglot.js.property-cache-limit=0', '-Dpolyglot.js.function-cache-limit=0', 'gate'],
        'directbytebuffer': ['-Dpolyglot.js.direct-byte-buffer=true', 'gate'],
        'cloneuninitialized': ['-Dpolyglot.js.test-clone-uninitialized=true', 'gate'],
        'lazytranslation': ['-Dpolyglot.js.lazy-translation=true', 'gate'],
        'zonerulesbasedtimezones': ['-Dpolyglot.js.zone-rules-based-time-zones=true', 'gate'],
        'shareengine': ['gate', 'shareengine'],
        'latestversion': ['gate', 'minesversion=2022'],
        'instrument': ['gate', 'instrument', 'timeoutoverall=1800']
    }

    gateTestCommands = {
        'Test262': test262,
        'TestNashorn': testnashorn,
        'TestV8': testv8,
    }

    for testCommandName in gateTestCommands:
        for testConfigName in gateTestConfigs:
            # TestNashorn is not sensitive to ES version
            if testCommandName == 'TestNashorn' and testConfigName == 'latestversion':
                continue
            testName = '%s-%s' % (testCommandName, testConfigName)
            with Task(testName, tasks, tags=[testName, testConfigName, GraalJsDefaultTags.all]) as t:
                if t:
                    gateTestCommands[testCommandName](gateTestConfigs[testConfigName])

    with Task('TCK tests', tasks, tags=[GraalJsDefaultTags.all, GraalJsDefaultTags.tck]) as t:
        if t:
            import mx_truffle
            mx_truffle._tck([])
Example #3
0
def _graal_js_gate_runner(args, tasks):
    with Task('TestJSCommand',
              tasks,
              tags=[GraalJsDefaultTags.default, GraalJsDefaultTags.all]) as t:
        if t:
            js(['-Dtruffle.js.ProfileTime=true', '-e', '""'])

    with Task('UnitTests',
              tasks,
              tags=[GraalJsDefaultTags.default, GraalJsDefaultTags.all]) as t:
        if t:
            unittest([
                '--enable-timing', '--very-verbose',
                'com.oracle.truffle.js.scriptengine.test'
            ])

    gateTestConfigs = {
        GraalJsDefaultTags.default: ['gate'],
        'noic': [
            '-Dtruffle.js.PropertyCacheLimit=0',
            '-Dtruffle.js.FunctionCacheLimit=0', 'gate'
        ],
        'directbytebuffer': ['-Dtruffle.js.DirectByteBuffer=true', 'gate'],
        'cloneuninitialized':
        ['-Dtruffle.js.TestCloneUninitialized=true', 'gate'],
        'lazytranslation': ['-Dtruffle.js.LazyTranslation=true', 'gate'],
        'shareengine': ['gate', 'shareengine'],
    }

    gateTestCommands = {
        'Test262': test262,
        'TestNashorn': testnashorn,
        'TestV8': testv8,
        'TestUnittest': testunittests,
    }

    for testCommandName in gateTestCommands:
        for testConfigName in gateTestConfigs:
            testName = '%s-%s' % (testCommandName, testConfigName)
            with Task(testName,
                      tasks,
                      tags=[testName, testConfigName,
                            GraalJsDefaultTags.all]) as t:
                if t:
                    gateTestCommands[testCommandName](
                        gateTestConfigs[testConfigName])

    with Task('TCK tests',
              tasks,
              tags=[GraalJsDefaultTags.all, GraalJsDefaultTags.tck]) as t:
        if t:
            import mx_truffle
            mx_truffle._tck([])