• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python mx.update_commands函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中mx.update_commands函数的典型用法代码示例。如果您正苦于以下问题:Python update_commands函数的具体用法?Python update_commands怎么用?Python update_commands使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了update_commands函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: mx_init

def mx_init(suite):
    mx.add_argument('--vmdir', dest='vmdir', help='directory for VM executable, shared libraries boot image and related files', metavar='<path>')

    commands = {
        'c1x': [c1x, '[options] patterns...'],
        'configs': [configs, ''],
        'copycheck': [copycheck, ''],
        'eclipse': [eclipse, '[VM options]'],
        'gate': [gate, '[options]'],
        'hcfdis': [hcfdis, '[options] files...'],
        'helloworld': [helloworld, '[VM options]'],
        'inspecthelloworld': [inspecthelloworld, '[VM options]'],
        'image': [image, '[options] classes|packages...'],
        'inspect': [inspect, '[options] [class | -jar jarfile]  [args...]'],
        'inspectoragent': [inspectoragent, '[-impl target] [-port port]'],
        'jnigen': [jnigen, ''],
        'jvmtigen': [jvmtigen, ''],
        'optionsgen': [optionsgen, ''],
        'jttgen': [jttgen, ''],
        'loggen': [loggen, ''],
        'makejdk': [makejdk, '[<destination directory>]'],
        'methodtree': [methodtree, '[options]'],
        'nm': [nm, '[options] [boot image file]', _vm_image],
        'objecttree': [objecttree, '[options]'],
        'olc': [olc, '[options] patterns...', _patternHelp],
        'site' : [site, '[options]'],
        't1x': [t1x, '[options] patterns...'],
        't1xgen': [t1xgen, ''],
        'test': [test, '[options]'],
        'verify': [verify, '[options] patterns...', _patternHelp],
        'view': [view, '[options]'],
        'vm': [vm, '[options] [class | -jar jarfile]  [args...]'],
        'wikidoc': [wikidoc, '[options]']
    }
    mx.update_commands(suite, commands)
开发者ID:arshcaria,项目名称:maxine-aarch64,代码行数:35,代码来源:commands.py


示例2: mx_init

def mx_init(suite):
    commands = {
        # new commands
        'python' : [python, '[Python args|@VM options]'],
        # core overrides
        'bench' : [bench, ''],
    }
    mx.update_commands(suite, commands)
开发者ID:wdv4758h,项目名称:ZipPy,代码行数:8,代码来源:mx_zippy.py


示例3:

mx.update_commands(_suite, {
    'suoptbench' : [suOptBench, ''],
    'subench' : [suBench, ''],
    'clangbench' : [clangBench, ''],
    'gccbench' : [gccBench, ''],
    'build' : [sulongBuild, ''],
    'su-options' : [printOptions, ''],
    'su-pullbenchmarkgame' : [pullBenchmarkGame, ''],
    'su-pulldeps' : [downloadDependencies, ''],
    'su-pullllvmbinaries' : [pullLLVMBinaries, ''],
    'su-pullnwccsuite' : [pullNWCCSuite, ''],
    'su-pullgccsuite' : [pullGCCSuite, ''],
    'su-pullllvmsuite' : [pullLLVMSuite, ''],
    'su-pulltools' : [pullTools, ''],
    'su-pulldragonegg' : [pullInstallDragonEgg, ''],
    'su-run' : [runLLVM, ''],
    'su-tests' : [runTests, ''],
    'su-local-gate' : [localGate, ''],
    'su-clang' : [compileWithClang, ''],
    'su-clang++' : [compileWithClangPP, ''],
    'su-opt' : [opt, ''],
    'su-optimize' : [suOptimalOpt, ''],
    'su-compile-optimize' : [suOptCompile, ''],
    'su-link' : [link, ''],
    'su-gcc' : [dragonEgg, ''],
    'su-gfortran' : [dragonEggGFortran, ''],
    'su-g++' : [dragonEggGPP, ''],
    'su-travis1' : [travis1, ''],
    'su-travis2' : [travis2, ''],
    'su-travis3' : [travis3, ''],
    'su-travis4' : [travis4, ''],
    'su-travis-sulong' : [travisTestSulong, ''],
    'su-travis-argon2' : [travisArgon2, ''],
    'su-travis-tests' : [testsuites.travisRunSuite, ''],
    'su-ecj-strict' : [compileWithEcjStrict, ''],
    'su-basic-checkcode' : [runChecks, ''],
    'su-gitlogcheck' : [logCheck, ''],
    'su-mdlcheck' : [mdlCheck, ''],
    'su-clangformatcheck' : [clangformatcheck, ''],
    'su-httpcheck' : [checkNoHttp, ''],
    'su-get-llvm-program' : [getLLVMProgramPath, ''],
    'su-get-gcc-program' : [getGCCProgramPath, ''],
    'su-compile-tests' : [testsuites.compileSuite, ''],
})
开发者ID:lxp,项目名称:sulong,代码行数:44,代码来源:mx_sulong.py


示例4: ArchiveProject

class ArchiveProject(mx.ArchivableProject):
    def __init__(self, suite, name, deps, workingSets, theLicense, **args):
        mx.ArchivableProject.__init__(self, suite, name, deps, workingSets, theLicense)
        assert 'prefix' in args
        assert 'outputDir' in args

    def output_dir(self):
        return join(self.dir, self.outputDir)

    def archive_prefix(self):
        return self.prefix

    def getResults(self):
        return mx.ArchivableProject.walk(self.output_dir())

class SulongDocsProject(ArchiveProject):
    doc_files = (glob.glob(join(_suite.dir, 'LICENSE')) +
        glob.glob(join(_suite.dir, '*.md')))

    def getResults(self):
        return [join(_suite.dir, f) for f in self.doc_files]


mx_benchmark.add_bm_suite(mx_sulong_benchmarks.SulongBenchmarkSuite())


mx.update_commands(_suite, {
    'pulldragonegg' : [pullInstallDragonEgg, ''],
    'lli' : [runLLVM, ''],
})
开发者ID:SwapnilGaikwad,项目名称:sulong,代码行数:30,代码来源:mx_sulong.py


示例5: specjbb2015

def specjbb2015(args):
    """run the composite SPECjbb2015 benchmark"""

    def launcher(bm, harnessArgs, extraVmOpts):
        assert bm is None
        return sanitycheck.getSPECjbb2015(harnessArgs).bench(mx_graal_core.get_vm(), extraVmOpts=extraVmOpts)

    _run_benchmark(args, None, launcher)

def specjbb2005(args):
    """run the composite SPECjbb2005 benchmark"""

    def launcher(bm, harnessArgs, extraVmOpts):
        assert bm is None
        return sanitycheck.getSPECjbb2005(harnessArgs).bench(mx_graal_core.get_vm(), extraVmOpts=extraVmOpts)

    _run_benchmark(args, None, launcher)

mx.update_commands(mx.suite('graal-core'), {
    'dacapo': [dacapo, '[VM options] benchmarks...|"all" [DaCapo options]'],
    'scaladacapo': [scaladacapo, '[VM options] benchmarks...|"all" [Scala DaCapo options]'],
    'specjvm2008': [specjvm2008, '[VM options] benchmarks...|"all" [SPECjvm2008 options]'],
    'specjbb2013': [specjbb2013, '[VM options] [-- [SPECjbb2013 options]]'],
    'specjbb2015': [specjbb2015, '[VM options] [-- [SPECjbb2015 options]]'],
    'specjbb2005': [specjbb2005, '[VM options] [-- [SPECjbb2005 options]]'],
    'bench' : [bench, '[-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'],
    'deoptalot' : [deoptalot, '[n]'],
    'longtests' : [longtests, ''],
})
开发者ID:Prototype1,项目名称:graal-core,代码行数:29,代码来源:mx_graal_bench.py


示例6: JVMCI9JDKFactory

        _jvmci_jdks[debugLevel] = jdk
    return jdk

class JVMCI9JDKFactory(mx.JDKFactory):
    def getJDKConfig(self):
        jdk = get_jvmci_jdk(_vm.debugLevel)
        return jdk

    def description(self):
        return "JVMCI JDK"

mx.update_commands(_suite, {
    'make': [_runmake, '[args...]', _makehelp],
    'multimake': [_runmultimake, '[options]'],
    'c1visualizer' : [c1visualizer, ''],
    'hsdis': [hsdis, '[att]'],
    'hcfdis': [hcfdis, ''],
    'igv' : [igv, ''],
    'jol' : [jol, ''],
    'vm': [run_vm, '[-options] class [args...]'],
})

mx.add_argument('-M', '--jvmci-mode', action='store', choices=sorted(_jvmciModes.viewkeys()), help='the JVM variant type to build/run (default: ' + _vm.jvmciMode + ')')
mx.add_argument('--jdk-jvm-variant', '--vm', action='store', choices=_jdkJvmVariants + sorted(_legacyVms.viewkeys()), help='the JVM variant type to build/run (default: ' + _vm.jvmVariant + ')')
mx.add_argument('--jdk-debug-level', '--vmbuild', action='store', choices=_jdkDebugLevels + sorted(_legacyVmbuilds.viewkeys()), help='the JDK debug level to build/run (default: ' + _vm.debugLevel + ')')
mx.add_argument('-I', '--use-jdk-image', action='store_true', help='build/run JDK image instead of exploded JDK')

mx.addJDKFactory(_JVMCI_JDK_TAG, mx.JavaCompliance('9'), JVMCI9JDKFactory())

def mx_post_parse_cmd_line(opts):
    mx.set_java_command_default_jdk_tag(_JVMCI_JDK_TAG)
开发者ID:mearvk,项目名称:JVM,代码行数:31,代码来源:mx_jvmci.py


示例7: build

def build(args, vm=None):
    """build the Java sources"""
    opts2 = mx.build(['--source', '1.7'] + args)
    assert len(opts2.remainder) == 0

def sl(args):
    """run an SL program"""
    vmArgs, slArgs = mx.extract_VM_args(args)
    mx.run_java(vmArgs + ['-cp', mx.classpath(["TRUFFLE_API", "com.oracle.truffle.sl"]), "com.oracle.truffle.sl.SLLanguage"] + slArgs)

def sldebug(args):
    """run a simple command line debugger for the Simple Language"""
    vmArgs, slArgs = mx.extract_VM_args(args, useDoubleDash=True)
    mx.run_java(vmArgs + ['-cp', mx.classpath("com.oracle.truffle.sl.tools"), "com.oracle.truffle.sl.tools.debug.SLREPL"] + slArgs)

def _truffle_gate_runner(args, tasks):
    with Task('Truffle Javadoc', tasks) as t:
        if t: mx.javadoc(['--unified'])
    with Task('Truffle UnitTests', tasks) as t:
        if t: unittest(['--suite', 'truffle', '--enable-timing', '--verbose', '--fail-fast'])
    with Task('Truffle Signature Tests', tasks) as t:
        if t: sigtest(['--check', 'binary'])

mx_gate.add_gate_runner(_suite, _truffle_gate_runner)

mx.update_commands(_suite, {
    'sl' : [sl, '[SL args|@VM options]'],
    'sldebug' : [sldebug, '[SL args|@VM options]'],
})
开发者ID:lukasstadler,项目名称:truffle,代码行数:29,代码来源:mx_truffle.py


示例8: Task

    with Task('Jackpot check', tasks) as t:
        if t: jackpot(['--fail-on-warnings'], suite=None, nonZeroIsFatal=True)
    if jdk.javaCompliance < '9':
        with Task('Truffle Javadoc', tasks) as t:
            if t: mx.javadoc(['--unified'])
    with Task('Truffle UnitTests', tasks) as t:
        if t: unittest(['--suite', 'truffle', '--enable-timing', '--verbose', '--fail-fast'])
    with Task('Truffle Signature Tests', tasks) as t:
        if t: sigtest(['--check', 'binary'])

mx_gate.add_gate_runner(_suite, _truffle_gate_runner)

mx.update_commands(_suite, {
    'javadoc' : [javadoc, '[SL args|@VM options]'],
    'sl' : [sl, '[SL args|@VM options]'],
    'repl' : [repl, '[REPL Debugger args|@VM options]'],
    'testrubytruffle' : [testrubytruffle, ''],
    'testgraal' : [testgraal, ''],
})

"""
Merges META-INF/truffle/language and META-INF/truffle/instrument files.
This code is tightly coupled with the file format generated by
LanguageRegistrationProcessor and InstrumentRegistrationProcessor.
"""
class TruffleArchiveParticipant:
    PROPERTY_RE = re.compile(r'(language\d+|instrument\d+)(\..+)')

    def _truffle_metainf_file(self, arcname):
        if arcname == 'META-INF/truffle/language':
            return 'language'
开发者ID:graalvm,项目名称:truffle,代码行数:31,代码来源:mx_truffle.py


示例9: create_asm_parser

 * with the distribution.
 *
 * 3. Neither the name of the copyright holder nor the names of its contributors may be used to
 * endorse or promote products derived from this software without specific prior written
 * permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE
 * COPYRIGHT HOLDER OR 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.
 */
// Checkstyle: stop
//@formatter:off
{0}
"""

def create_asm_parser(args=None, out=None):
    """create the inline assembly parser using antlr"""
    mx.suite("truffle").extensions.create_parser("com.oracle.truffle.llvm.asm.amd64", "com.oracle.truffle.llvm.asm.amd64", "InlineAssembly", COPYRIGHT_HEADER_BSD, args, out)

mx.update_commands(_suite, {
    'lli' : [runLLVM, ''],
    'test-llvm-image' : [_test_llvm_image, 'test a pre-built LLVM image'],
    'create-asm-parser' : [create_asm_parser, 'create the inline assembly parser using antlr'],
})
开发者ID:jakre,项目名称:sulong,代码行数:30,代码来源:mx_sulong.py


示例10:

mx.update_commands(_suite, {
    'suoptbench' : [suOptBench, ''],
    'subench' : [suBench, ''],
    'clangbench' : [clangBench, ''],
    'gccbench' : [gccBench, ''],
    'su-options' : [printOptions, ''],
    'su-pullbenchmarkgame' : [pullBenchmarkGame, ''],
    'su-pulldeps' : [downloadDependencies, ''],
    'su-pullllvmbinaries' : [pullLLVMBinaries, ''],
    'su-pullnwccsuite' : [pullNWCCSuite, ''],
    'su-pullgccsuite' : [pullGCCSuite, ''],
    'su-pullllvmsuite' : [pullLLVMSuite, ''],
    'su-pulltools' : [pullTools, ''],
    'su-pulldragonegg' : [pullInstallDragonEgg, ''],
    'su-run' : [runLLVM, ''],
    'su-tests' : [runTests, ''],
    'su-tests-bench' : [runBenchmarkTestCases, ''],
    'su-tests-gcc' : [runGCCTestCases, ''],
    'su-tests-llvm' : [runLLVMTestCases, ''],
    'su-tests-sulong' : [runTruffleTestCases, ''],
    'su-tests-nwcc' : [runNWCCTestCases, ''],
    'su-tests-types' : [runTypeTestCases, ''],
    'su-tests-polyglot' : [runPolyglotTestCases, ''],
    'su-tests-interop' : [runInteropTestCases, ''],
    'su-tests-asm' : [runAsmTestCases, ''],
    'su-tests-compile' : [runCompileTestCases, ''],
    'su-tests-jruby' : [runTestJRuby, ''],
    'su-local-gate' : [localGate, ''],
    'su-clang' : [compileWithClang, ''],
    'su-clang++' : [compileWithClangPP, ''],
    'su-opt' : [opt, ''],
    'su-link' : [link, ''],
    'su-gcc' : [dragonEgg, ''],
    'su-gfortran' : [dragonEggGFortran, ''],
    'su-g++' : [dragonEggGPP, ''],
    'su-travis1' : [travis1, ''],
    'su-travis2' : [travis2, ''],
    'su-travis3' : [travis3, ''],
    'su-travis-jruby' : [travisJRuby, ''],
    'su-gitlogcheck' : [logCheck, ''],
    'su-mdlcheck' : [mdlCheck, ''],
    'su-clangformatcheck' : [clangformatcheck, '']
})
开发者ID:NeilBryant,项目名称:sulong,代码行数:43,代码来源:mx_sulong.py


示例11: setup_jruby_home

    # Give precedence to graal classpath and VM options
    classpath = user_classpath + classpath
    vmArgs = vmArgs + [
        # '-Xss2048k',
        '-Xbootclasspath/a:' + truffle_api,
        '-cp', ':'.join(classpath),
        'org.jruby.truffle.Main'
    ]
    allArgs = vmArgs + ['-X+T'] + rubyArgs

    env = setup_jruby_home()

    if print_command:
        if mx.get_opts().verbose:
            log('Environment variables:')
            for key in sorted(env.keys()):
                log(key + '=' + env[key])
        log(java + ' ' + ' '.join(map(pipes.quote, allArgs)))
    return os.execve(java, [argv0] + allArgs, env)

def ruby_tck(args):
    env = setup_jruby_home()
    os.environ["JRUBY_HOME"] = env["JRUBY_HOME"]
    mx_unittest.unittest(['--verbose', '--suite', 'jruby'])

mx.update_commands(_suite, {
    'ruby' : [ruby_command, '[ruby args|@VM options]'],
    'rubytck': [ruby_tck, ''],
    'deploy-binary-if-truffle-head': [deploy_binary_if_truffle_head, ''],
})
开发者ID:sumitmah,项目名称:jruby,代码行数:30,代码来源:mx_jruby.py


示例12: __addsrc__

    def __addsrc__(self, arcname, contents):
        return False

    def __closing__(self):
        pass

mx.add_argument('--vmprefix', action='store', dest='vm_prefix', help='prefix for running the VM (e.g. "gdb --args")', metavar='<prefix>')
mx.add_argument('--gdb', action='store_const', const='gdb --args', dest='vm_prefix', help='alias for --vmprefix "gdb --args"')
mx.add_argument('--lldb', action='store_const', const='lldb --', dest='vm_prefix', help='alias for --vmprefix "lldb --"')

def sl(args):
    """run an SL program"""
    mx.get_opts().jdk = 'jvmci'
    mx_truffle.sl(args)

mx.update_commands(_suite, {
    'sl' : [sl, '[SL args|@VM options]'],
    'vm': [run_vm, '[-options] class [args...]'],
    'ctw': [ctw, '[-vmoptions|noinline|nocomplex|full]'],
    'nodecostdump' : [_nodeCostDump, ''],
    'verify_jvmci_ci_versions': [verify_jvmci_ci_versions, ''],
})

def mx_post_parse_cmd_line(opts):
    mx.add_ide_envvar('JVMCI_VERSION_CHECK')
    for dist in _suite.dists:
        dist.set_archiveparticipant(GraalArchiveParticipant(dist, isTest=dist.name.endswith('_TEST')))
    add_bootclasspath_append(mx.distribution('truffle:TRUFFLE_API'))
    global _vm_prefix
    _vm_prefix = opts.vm_prefix
开发者ID:mur47x111,项目名称:graal-core,代码行数:30,代码来源:mx_graal_core.py


示例13:

))

mx_sdk.register_graalvm_component(mx_sdk.GraalVmTool(
    suite=_suite,
    name='GraalVM Profiler',
    short_name='pro',
    dir_name='profiler',
    license_files=[],
    third_party_license_files=[],
    truffle_jars=['tools:TRUFFLE_PROFILER'],
    support_distributions=['tools:TRUFFLE_PROFILER_GRAALVM_SUPPORT'],
    include_by_default=True,
))

mx_sdk.register_graalvm_component(mx_sdk.GraalVmJdkComponent(
    suite=_suite,
    name='VisualVM',
    short_name='vvm',
    dir_name='visualvm',
    license_files=[],
    third_party_license_files=[],
    support_distributions=['tools:VISUALVM_GRAALVM_SUPPORT'],
    provided_executables=['bin/jvisualvm']
))

mx.update_commands(_suite, {
    'javadoc' : [javadoc, ''],
    'gate' : [mx_gate.gate, ''],
})

开发者ID:charig,项目名称:truffle,代码行数:29,代码来源:mx_tools.py


示例14: ArchiveProject

class ArchiveProject(mx.ArchivableProject):
    def __init__(self, suite, name, deps, workingSets, theLicense, **args):
        mx.ArchivableProject.__init__(self, suite, name, deps, workingSets, theLicense)
        assert 'prefix' in args
        assert 'outputDir' in args

    def output_dir(self):
        return join(self.dir, self.outputDir)

    def archive_prefix(self):
        return self.prefix

    def getResults(self):
        return mx.ArchivableProject.walk(self.output_dir())

class SulongDocsProject(ArchiveProject):
    doc_files = (glob.glob(join(_suite.dir, 'LICENSE')) +
        glob.glob(join(_suite.dir, '*.md')))

    def getResults(self):
        return [join(_suite.dir, f) for f in self.doc_files]


mx_benchmark.add_bm_suite(mx_sulong_benchmarks.SulongBenchmarkSuite())


mx.update_commands(_suite, {
    'lli' : [runLLVM, ''],
})
开发者ID:pekd,项目名称:sulong,代码行数:29,代码来源:mx_sulong.py


示例15:

        "substratevm:POLYGLOT_NATIVE_API_HEADERS"
    ],
    has_polyglot_lib_entrypoints=True,
))

if os.environ.has_key('NATIVE_IMAGE_TESTING'):
    mx_sdk.register_graalvm_component(mx_sdk.GraalVmTool(
        suite=suite,
        name='Native Image JUnit',
        short_name='nju',
        dir_name='junit',
        license_files=[],
        third_party_license_files=[],
        truffle_jars=[],
        builder_jar_distributions=['mx:JUNIT_TOOL', 'mx:JUNIT', 'mx:HAMCREST'],
        support_distributions=['substratevm:NATIVE_IMAGE_JUNIT_SUPPORT'],
        include_in_polyglot=False,
    ))

mx.update_commands(suite, {
    'gate': [gate, '[options]'],
    'build': [build, ''],
    'helloworld' : [lambda args: native_image_context_run(helloworld, args), ''],
    'cinterfacetutorial' : [lambda args: native_image_context_run(cinterfacetutorial, args), ''],
    'fetch-languages': [lambda args: fetch_languages(args, early_exit=False), ''],
    'benchmark': [benchmark, '--vmargs [vmargs] --runargs [runargs] suite:benchname'],
    'native-image': [native_image_on_jvm, ''],
    'maven-plugin-install': [maven_plugin_install, ''],
    'native-unittest' : [lambda args: native_image_context_run(native_unittest, args), ''],
})
开发者ID:charig,项目名称:truffle,代码行数:30,代码来源:mx_substratevm.py


示例16: print

import mx

print("****** In mx_sample.py")

def function(args=None):
   print "###### In function() for target 'fun'"

_suite = mx.suite('sample')
mx.update_commands(_suite,{
  'fun' : [function]}
)
开发者ID:SwapnilGaikwad,项目名称:mxTest,代码行数:11,代码来源:mx_sample.py


示例17: truffle_extract_VM_args

from mx_unittest import unittest

_suite = mx.suite('truffle')

def truffle_extract_VM_args(args, useDoubleDash=False):
    vmArgs, remainder = [], []
    for (i, arg) in enumerate(args):
        if any(arg.startswith(prefix) for prefix in ['-X', '-G:', '-D', '-verbose', '-ea']) or arg in ['-esa']:
            vmArgs += [arg]
        elif useDoubleDash and arg == '--':
            remainder += args[i:]
            break
        else:
            remainder += [arg]
    return vmArgs, remainder

def build(args, vm=None):
    """build the Java sources"""
    opts2 = mx.build(['--source', '1.7'] + args)
    assert len(opts2.remainder) == 0

def erl(args):
    """run an Erlang program"""
    vmArgs, erlArgs = truffle_extract_VM_args(args)
    mx.run_java(vmArgs + ['-cp', mx.classpath(["TRUFFLE_API", "com.oracle.truffle.erl"]), "com.oracle.truffle.erl.ErlangLanguage"] + erlArgs)

mx.update_commands(_suite, {
    'erl' : [erl, '[Erlang args|@VM options]'],
})
开发者ID:smarr,项目名称:graal-erl,代码行数:29,代码来源:mx_graal_erl.py


示例18: Task

            mx.javadoc(["--unified"])
    with Task("Truffle UnitTests", tasks) as t:
        if t:
            unittest(["--suite", "truffle", "--enable-timing", "--verbose", "--fail-fast"])
    with Task("Truffle Signature Tests", tasks) as t:
        if t:
            sigtest(["--check", "binary"])


mx_gate.add_gate_runner(_suite, _truffle_gate_runner)

mx.update_commands(
    _suite,
    {
        "javadoc": [javadoc, "[SL args|@VM options]"],
        "sl": [sl, "[SL args|@VM options]"],
        "sldebug": [sldebug, "[SL args|@VM options]"],
        "testdownstream": [testdownstream, ""],
    },
)

"""
Merges META-INF/truffle/language and META-INF/truffle/instrumentation files.
This code is tightly coupled with the file format generated by
LanguageRegistrationProcessor and InstrumentRegistrationProcessor.
"""


class TruffleArchiveParticipant:
    PROPERTY_RE = re.compile(r"(language\d+|instrumentation\d+)(\..+)")
开发者ID:eregon,项目名称:truffle,代码行数:30,代码来源:mx_truffle.py


示例19: __addsrc__

                # Need to create service files for the providers of the
                # jdk.vm.ci.options.Options service created by
                # jdk.vm.ci.options.processor.OptionProcessor.
                provider = arcname[:-len('.class'):].replace('/', '.')
                self.services.setdefault('com.oracle.graal.options.OptionDescriptors', []).append(provider)
        return False

    def __addsrc__(self, arcname, contents):
        return False

    def __closing__(self):
        pass

mx.add_argument('--vmprefix', action='store', dest='vm_prefix', help='prefix for running the VM (e.g. "gdb --args")', metavar='<prefix>')
mx.add_argument('--gdb', action='store_const', const='gdb --args', dest='vm_prefix', help='alias for --vmprefix "gdb --args"')
mx.add_argument('--lldb', action='store_const', const='lldb --', dest='vm_prefix', help='alias for --vmprefix "lldb --"')

mx.update_commands(_suite, {
    'vm': [run_vm, '[-options] class [args...]'],
    'ctw': [ctw, '[-vmoptions|noinline|nocomplex|full]'],
    'verify_jvmci_ci_versions': [verify_jvmci_ci_versions, ''],
})

def mx_post_parse_cmd_line(opts):
    mx.add_ide_envvar('JVMCI_VERSION_CHECK')
    for dist in _suite.dists:
        dist.set_archiveparticipant(GraalArchiveParticipant(dist, isTest=dist.name.endswith('_TEST')))
    add_bootclasspath_append(mx.distribution('truffle:TRUFFLE_API'))
    global _vm_prefix
    _vm_prefix = opts.vm_prefix
开发者ID:graalvm,项目名称:graal-core,代码行数:30,代码来源:mx_graal_core.py


示例20: load_optional_suite

    _bm_suite = load_optional_suite('r_benchmarks', _r_benchmarks_rev)

_commands = {
    # new commands
    'r' : [rshell, '[options]'],
    'R' : [rshell, '[options]'],
    'rscript' : [rscript, '[options]'],
    'Rscript' : [rscript, '[options]'],
    'rtestgen' : [testgen, ''],
    # core overrides
    'bench' : [bench, ''],
    'rbench' : [rbench, ''],
    'build' : [build, ''],
    'gate' : [gate, ''],
    'junit' : [junit, ['options']],
    'junitsimple' : [junit_simple, ['options']],
    'junitdefault' : [junit_default, ['options']],
    'junitgate' : [junit_gate, ['options']],
    'junitnoapps' : [junit_noapps, ['options']],
    'unittest' : [unittest, ['options']],
    'rbcheck' : [rbcheck, ['options']],
    'rcmplib' : [rcmplib, ['options']],
    'test' : [test, ['options']],
    'rrepl' : [rrepl, '[options]'],
    'installcran' : [installcran, '[options]'],
    }

_commands.update(mx_fastr_pkgtest._commands)

mx.update_commands(_fastr_suite, _commands)
开发者ID:anukat2015,项目名称:fastr,代码行数:30,代码来源:mx_fastr.py



注:本文中的mx.update_commands函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python mx.warn函数代码示例发布时间:2022-05-27
下一篇:
Python mx.suite函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap