示例#1
0
def testLLVMImage(image,
                  imageArgs=None,
                  testFilter=None,
                  libPath=True,
                  test=None,
                  unittestArgs=None):
    """runs the SulongSuite tests on an AOT compiled lli image"""
    args = ['-Dsulongtest.testAOTImage=' + image]
    aotArgs = []
    if libPath:
        aotArgs += [mx_subst.path_substitutions.substitute('<sulong_home>')]
    if imageArgs is not None:
        aotArgs += imageArgs
    if aotArgs:
        args += ['-Dsulongtest.testAOTArgs=' + ' '.join(aotArgs)]
    if testFilter is not None:
        args += ['-Dsulongtest.testFilter=' + testFilter]
    testName = 'SulongSuite'
    if test is not None:
        testName += '#test[' + test + ']'
    if unittestArgs is None:
        unittestArgs = []
    test_suite = 'SULONG_TEST_SUITES'
    mx_testsuites.compileTestSuite(test_suite, extra_build_args=[])
    mx_testsuites.run(args + unittestArgs, testName)
示例#2
0
文件: mx_sulong.py 项目: aeonve/graal
def _sulong_gate_unittest(title, test_suite, tasks, args, tags=None, testClasses=None, unittestArgs=None):
    if tags is None:
        tags = [test_suite]
    if testClasses is None:
        testClasses = [test_suite]
    build_tags = ['build_' + t for t in tags]
    run_tags = ['run_' + t for t in tags]
    if not unittestArgs:
        unittestArgs = []
    unittestArgs += args.extra_llvm_arguments
    with Task('Build' + title, tasks, tags=tags + build_tags) as t:
        if t: mx_testsuites.compileTestSuite(test_suite, args.extra_build_args)
    with Task('Test' + title, tasks, tags=tags + run_tags) as t:
        if t: mx_testsuites.run(unittestArgs, testClasses)