コード例 #1
0
ファイル: mx_sulong.py プロジェクト: lxp/sulong
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.')
コード例 #2
0
ファイル: mx_fastr.py プロジェクト: chumer/fastr
def testgen(args):
    '''generate the expected output for unit tests, and All/Failing test classes'''
    parser = ArgumentParser(prog='r testgen')
    parser.add_argument('--tests', action='store', default=_all_unit_tests(), help='pattern to match test classes')
    args = parser.parse_args(args)
    # check we are in the home directory
    if os.getcwd() != _fastr_suite.dir:
        mx.abort('must run rtestgen from FastR home directory')
    # check the version of GnuR against FastR
    try:
        fastr_version = subprocess.check_output([mx.get_jdk().java, '-cp', mx.classpath('com.oracle.truffle.r.runtime'), 'com.oracle.truffle.r.runtime.RVersionNumber'])
        gnur_version = subprocess.check_output(['R', '--version'])
        if not gnur_version.startswith(fastr_version):
            mx.abort('R version is incompatible with FastR, please update to ' + fastr_version)
    except subprocess.CalledProcessError:
        mx.abort('RVersionNumber.main failed')
    # clean the test project to invoke the test analyzer AP
    testOnly = ['--projects', 'com.oracle.truffle.r.test']
    mx.clean(['--no-dist', ] + testOnly)
    mx.build(testOnly)
    # now just invoke junit with the appropriate options
    mx.log("generating expected output for packages: ")
    for pkg in args.tests.split(','):
        mx.log("    " + str(pkg))
    junit(['--tests', args.tests, '--gen-expected-output', '--gen-expected-quiet'])
コード例 #3
0
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.')
コード例 #4
0
ファイル: mx_sulong.py プロジェクト: graalvm/sulong
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.")
コード例 #5
0
def findBugs(args=None):
    tasks = []
    with Task('Clean', tasks) as t:
        if t: mx.clean([])  # we need a clean build before running findbugs
    with Task('Build', tasks) as t:
        if t: mx.build(['--force-javac'])
    with Task('Findbugs', tasks) as t:
        if t and mx_findbugs.findbugs([]) != 0:
            t.abort('FindBugs warnings were found')
コード例 #6
0
ファイル: mx_sulong.py プロジェクト: lxp/sulong
def findBugs(args=None):
    tasks = []
    with Task('Clean', tasks) as t:
        if t: mx.clean([]) # we need a clean build before running findbugs
    with Task('Build', tasks) as t:
        if t: mx.build([])
    with Task('Findbugs', tasks) as t:
        if t and mx_findbugs.findbugs([]) != 0:
            t.abort('FindBugs warnings were found')
コード例 #7
0
def nativeclean(args):
    "Clean the non-Java Python projects"
    mx.clean(["--dependencies", ",".join(PYTHON_NATIVE_PROJECTS)])