comparison mx.truffle/mx_truffle.py @ 22034:a4c9f8c89c68

Add unit tests to truffle gate.
author Roland Schatz <roland.schatz@oracle.com>
date Mon, 27 Jul 2015 16:34:38 +0200
parents 92168cb0e803
children 88eaf4852595
comparison
equal deleted inserted replaced
22033:79206d503322 22034:a4c9f8c89c68
25 # questions. 25 # questions.
26 # 26 #
27 # ---------------------------------------------------------------------------------------------------- 27 # ----------------------------------------------------------------------------------------------------
28 28
29 import mx 29 import mx
30
31 from mx_unittest import unittest
32 from mx_gate import Task
33 import mx_gate
30 34
31 _suite = mx.suite('truffle') 35 _suite = mx.suite('truffle')
32 36
33 def build(args, vm=None): 37 def build(args, vm=None):
34 """build the Java sources""" 38 """build the Java sources"""
58 def sldebug(args): 62 def sldebug(args):
59 """run a simple command line debugger for the Simple Language""" 63 """run a simple command line debugger for the Simple Language"""
60 vmArgs, slArgs = mx.extract_VM_args(args, useDoubleDash=True) 64 vmArgs, slArgs = mx.extract_VM_args(args, useDoubleDash=True)
61 mx.run_java(vmArgs + ['-cp', mx.classpath("com.oracle.truffle.sl.tools"), "com.oracle.truffle.sl.tools.debug.SLREPLServer"] + slArgs) 65 mx.run_java(vmArgs + ['-cp', mx.classpath("com.oracle.truffle.sl.tools"), "com.oracle.truffle.sl.tools.debug.SLREPLServer"] + slArgs)
62 66
67 def _truffle_gate_runner(args, tasks):
68 with Task('Truffle UnitTests', tasks) as t:
69 if t: unittest(['--suite', 'truffle', '--enable-timing', '--verbose', '--fail-fast'])
70
71 mx_gate.add_gate_runner(_suite, _truffle_gate_runner)
72
63 mx.update_commands(_suite, { 73 mx.update_commands(_suite, {
64 'maven-install-truffle' : [maven_install_truffle, ''], 74 'maven-install-truffle' : [maven_install_truffle, ''],
65 'sl' : [sl, '[SL args|@VM options]'], 75 'sl' : [sl, '[SL args|@VM options]'],
66 'sldebug' : [sldebug, '[SL args|@VM options]'], 76 'sldebug' : [sldebug, '[SL args|@VM options]'],
67 }) 77 })