本文整理汇总了Python中mx.command_function函数的典型用法代码示例。如果您正苦于以下问题:Python command_function函数的具体用法?Python command_function怎么用?Python command_function使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了command_function函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: travis1
def travis1(args=None):
"""executes the first Travis job (Javac build, benchmarks, polyglot, interop, tck, asm, types, and LLVM test cases)"""
tasks = []
with Task("BuildJavaWithJavac", tasks) as t:
if t:
mx.command_function("build")(["-p", "--warning-as-error", "--force-javac"])
with Task("TestBenchmarks", tasks) as t:
if t:
runBenchmarkTestCases()
with Task("TestPolglot", tasks) as t:
if t:
runPolyglotTestCases()
with Task("TestInterop", tasks) as t:
if t:
runInteropTestCases()
with Task("TestTck", tasks) as t:
if t:
runTckTestCases()
with Task("TestAsm", tasks) as t:
if t:
runAsmTestCases()
with Task("TestTypes", tasks) as t:
if t:
runTypeTestCases()
with Task("TestLLVM", tasks) as t:
if t:
runLLVMTestCases()
with Task("TestMainArgs", tasks) as t:
if t:
runMainArgTestCases()
with Task("TestPipe", tasks) as t:
if t:
runPipeTestCases()
示例2: travisJRuby
def travisJRuby(args=None):
"""executes the JRuby Travis job (Javac build, JRuby test cases)"""
tasks = []
with Task('BuildJavaWithJavac', tasks) as t:
if t: mx.command_function('build')(['-p', '--warning-as-error', '--no-native', '--force-javac'])
with Task('TestJRuby', tasks) as t:
if t: runTestJRuby()
示例3: travis2
def travis2(args=None):
"""executes the second Travis job (Javac build, GCC execution test cases)"""
tasks = []
with Task('BuildJavaWithJavac', tasks) as t:
if t: mx.command_function('build')(['-p', '--warning-as-error', '--force-javac'])
with Task('TestGCC', tasks) as t:
if t: runGCCTestCases()
示例4: travisArgon2
def travisArgon2(args=None):
"""executes the argon2 Travis job (Javac build, argon2 test cases)"""
tasks = []
with Task('BuildJavaWithJavac', tasks) as t:
if t: mx.command_function('build')(['-p', '--warning-as-error', '--force-javac'])
with Task('TestArgon2', tasks) as t:
if t: runTestArgon2(optimize=False)
示例5: travisTestSulong
def travisTestSulong(args=None):
"""executes the Sulong test cases (which also stress compilation)"""
tasks = []
with Task('BuildJavaWithJavac', tasks) as t:
if t: mx.command_function('build')(['-p', '--warning-as-error', '--force-javac'])
with Task('TestSulong', tasks) as t:
if t: runTruffleTestCases()
示例6: compileWithEcjStrict
def compileWithEcjStrict(args=None):
"""build project with the option --warning-as-error"""
if mx.get_env("JDT"):
mx.clean([])
mx.command_function("build")(["-p", "--warning-as-error"])
else:
exit("JDT environment variable not set. Cannot execute BuildJavaWithEcj task.")
示例7: travis1
def travis1(args=None):
tasks = []
with Task('BuildJavaWithEcj', tasks) as t:
if t:
if mx.get_env('JDT'):
mx.command_function('build')(['-p', '--no-native', '--warning-as-error'])
gate_clean([], tasks, name='CleanAfterEcjBuild')
else:
mx._warn_or_abort('JDT environment variable not set. Cannot execute BuildJavaWithEcj task.', args.strict_mode)
with Task('BuildJavaWithJavac', tasks) as t:
if t: mx.command_function('build')(['-p', '--warning-as-error', '--no-native', '--force-javac'])
with Task('Findbugs', tasks) as t:
if t and mx_findbugs.findbugs([]) != 0:
t.abort('FindBugs warnings were found')
with Task('TestBenchmarks', tasks) as t:
if t: runBenchmarkTestCases()
with Task('TestPolglot', tasks) as t:
if t: runPolyglotTestCases()
with Task('TestInterop', tasks) as t:
if t: runInteropTestCases()
with Task('TestAsm', tasks) as t:
if t: runAsmTestCases()
with Task('TestTypes', tasks) as t:
if t: runTypeTestCases()
with Task('TestSulong', tasks) as t:
if t: runTruffleTestCases()
with Task('TestLLVM', tasks) as t:
if t: runLLVMTestCases()
示例8: travis3
def travis3(args=None):
tasks = []
with Task('BuildJavaWithJavac', tasks) as t:
if t: mx.command_function('build')(['-p', '--warning-as-error', '--no-native', '--force-javac'])
with Task('TestNWCC', tasks) as t:
if t: runNWCCTestCases()
with Task('TestGCCSuiteCompile', tasks) as t:
if t: runCompileTestCases()
示例9: travis3
def travis3(args=None):
"""executes the third Travis job (Javac build, NWCC, GCC compilation test cases)"""
tasks = []
with Task('BuildJavaWithJavac', tasks) as t:
if t: mx.command_function('build')(['-p', '--warning-as-error', '--no-native', '--force-javac'])
with Task('TestNWCC', tasks) as t:
if t: runNWCCTestCases()
with Task('TestGCCSuiteCompile', tasks) as t:
if t: runCompileTestCases()
示例10: travis4
def travis4(args=None):
"""executes the fourth Travis job (Javac build, LLVM and GCC test cases with BitCode parser)"""
tasks = []
with Task('BuildJavaWithJavac', tasks) as t:
if t: mx.command_function('build')(['-p', '--warning-as-error', '--force-javac'])
with Task('TestLLVMBC', tasks) as t:
if t: runLLVMTestCases(['-Dsulong.TestBinaryParser=true'])
with Task('TestGCCBC', tasks) as t:
if t: runGCCTestCases(['-Dsulong.TestBinaryParser=true'])
示例11: travisArgon2
def travisArgon2(args=None):
"""executes the argon2 Travis job (Javac build, argon2 test cases)"""
tasks = []
with Task("BuildJavaWithJavac", tasks) as t:
if t:
mx.command_function("build")(["-p", "--warning-as-error", "--force-javac"])
with Task("TestArgon2", tasks) as t:
if t:
runTestArgon2(optimize=False)
示例12: travisTestSulong
def travisTestSulong(args=None):
"""executes the Sulong test cases (which also stress compilation)"""
tasks = []
with Task("BuildJavaWithJavac", tasks) as t:
if t:
mx.command_function("build")(["-p", "--warning-as-error", "--force-javac"])
with Task("TestSulong", tasks) as t:
if t:
runTruffleTestCases()
示例13: travis2
def travis2(args=None):
"""executes the second Travis job (Javac build, GCC execution test cases)"""
tasks = []
with Task("BuildJavaWithJavac", tasks) as t:
if t:
mx.command_function("build")(["-p", "--warning-as-error", "--force-javac"])
with Task("TestGCC", tasks) as t:
if t:
runGCCTestCases()
示例14: travis4
def travis4(args=None):
"""executes the fourth Travis job (Javac build, LLVM and GCC test cases with BitCode parser)"""
tasks = []
with Task("BuildJavaWithJavac", tasks) as t:
if t:
mx.command_function("build")(["-p", "--warning-as-error", "--force-javac"])
with Task("TestLLVMBC", tasks) as t:
if t:
runLLVMTestCases(["-Dsulong.TestBinaryParser=true"])
with Task("TestGCCBC", tasks) as t:
if t:
runGCCTestCases(["-Dsulong.TestBinaryParser=true"])
示例15: travis3
def travis3(args=None):
"""executes the third Travis job (Javac build, NWCC, GCC compilation test cases)"""
tasks = []
with Task("BuildJavaWithJavac", tasks) as t:
if t:
mx.command_function("build")(["-p", "--warning-as-error", "--force-javac"])
with Task("TestNWCC", tasks) as t:
if t:
runNWCCTestCases()
with Task("TestGCCSuiteCompile", tasks) as t:
if t:
runCompileTestCases()
with Task("TestLifetime", tasks) as t:
if t:
runLifetimeTestCases()