changeset 5257:a549662f6c6f

added 'vmg' and 'vmfg' commands to mx as convenient aliases for running the debug and fastdebug builds of the selected VM
author Doug Simon <doug.simon@oracle.com>
date Fri, 20 Apr 2012 14:10:57 +0200
parents 38feba3e8526
children 97b1e0ab7442
files mx/commands.py
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mx/commands.py	Thu Apr 19 22:57:53 2012 +0200
+++ b/mx/commands.py	Fri Apr 20 14:10:57 2012 +0200
@@ -547,6 +547,14 @@
         else:
             file(timestampFile, 'a')
 
+def vmg(args):
+    """run the debug build of VM selected by the '--vm' option"""
+    return vm(args, vmbuild='debug')
+
+def vmfg(args):
+    """run the fastdebug build of VM selected by the '--vm' option"""
+    return vm(args, vmbuild='fastdebug')
+
 def vm(args, vm=None, nonZeroIsFatal=True, out=None, err=None, cwd=None, timeout=None, vmbuild=None):
     """run the VM selected by the '--vm' option"""
 
@@ -988,7 +996,9 @@
         'unittest' : [unittest, '[filters...]'],
         'jtt' : [jtt, '[filters...]'],
         'jacocoreport' : [jacocoreport, '[output directory]'],
-        'vm': [vm, '[-options] class [args...]']
+        'vm': [vm, '[-options] class [args...]'],
+        'vmg': [vmg, '[-options] class [args...]'],
+        'vmfg': [vmfg, '[-options] class [args...]']
     }
     
     mx.add_argument('--jacoco', help='instruments com.oracle.* classes using JaCoCo', default='off', choices=['off', 'on', 'append'])