comparison mx/commands.py @ 11867:952ecf32788a

mx sl command.
author Chris Seaton <chris.seaton@oracle.com>
date Wed, 02 Oct 2013 14:19:28 +0100
parents 65dbed1fdf46
children 4cdf7623fbe6
comparison
equal deleted inserted replaced
11858:cdff87c89c5f 11867:952ecf32788a
1316 out = args[0] 1316 out = args[0]
1317 elif len(args) > 1: 1317 elif len(args) > 1:
1318 mx.abort('jacocoreport takes only one argument : an output directory') 1318 mx.abort('jacocoreport takes only one argument : an output directory')
1319 mx.run_java(['-jar', jacocoreport.get_path(True), '-in', 'jacoco.exec', '-g', join(_graal_home, 'graal'), out]) 1319 mx.run_java(['-jar', jacocoreport.get_path(True), '-in', 'jacoco.exec', '-g', join(_graal_home, 'graal'), out])
1320 1320
1321 def sl(args):
1322 """run an SL program
1323
1324 VM args should have a @ prefix."""
1325 vmArgs = [a[1:] for a in args if a[0] == '@']
1326 slArgs = [a for a in args if a[0] != '@']
1327 vm(vmArgs + ['-cp', mx.classpath("com.oracle.truffle.sl"), "com.oracle.truffle.sl.SimpleLanguage"] + slArgs)
1328
1321 def isGraalEnabled(vm): 1329 def isGraalEnabled(vm):
1322 return vm != 'original' and not vm.endswith('nograal') 1330 return vm != 'original' and not vm.endswith('nograal')
1323 1331
1324 def site(args): 1332 def site(args):
1325 """create a website containing javadoc and the project dependency graph""" 1333 """create a website containing javadoc and the project dependency graph"""
1359 'site' : [site, '[-options]'], 1367 'site' : [site, '[-options]'],
1360 'vm': [vm, '[-options] class [args...]'], 1368 'vm': [vm, '[-options] class [args...]'],
1361 'vmg': [vmg, '[-options] class [args...]'], 1369 'vmg': [vmg, '[-options] class [args...]'],
1362 'vmfg': [vmfg, '[-options] class [args...]'], 1370 'vmfg': [vmfg, '[-options] class [args...]'],
1363 'deoptalot' : [deoptalot, '[n]'], 1371 'deoptalot' : [deoptalot, '[n]'],
1364 'longtests' : [longtests, ''] 1372 'longtests' : [longtests, ''],
1373 'sl' : [sl, '[SL args|@VM options]']
1365 } 1374 }
1366 1375
1367 mx.add_argument('--jacoco', help='instruments com.oracle.* classes using JaCoCo', default='off', choices=['off', 'on', 'append']) 1376 mx.add_argument('--jacoco', help='instruments com.oracle.* classes using JaCoCo', default='off', choices=['off', 'on', 'append'])
1368 mx.add_argument('--vmcwd', dest='vm_cwd', help='current directory will be changed to <path> before the VM is executed', default=None, metavar='<path>') 1377 mx.add_argument('--vmcwd', dest='vm_cwd', help='current directory will be changed to <path> before the VM is executed', default=None, metavar='<path>')
1369 mx.add_argument('--installed-jdks', help='the base directory in which the JDKs cloned from $JAVA_HOME exist. ' + 1378 mx.add_argument('--installed-jdks', help='the base directory in which the JDKs cloned from $JAVA_HOME exist. ' +