Mercurial > hg > graal-jvmci-8
comparison mx.jvmci/mx_jvmci.py @ 22167:22b37f37be0a
adapted to removal of mx_init() mechanism from mx2
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 08 Jul 2015 23:15:02 +0200 |
parents | 2d03fccbbfa9 |
children | f9ddf6b6dd6b |
comparison
equal
deleted
inserted
replaced
22166:2d03fccbbfa9 | 22167:22b37f37be0a |
---|---|
1949 failures[f] = csConfig | 1949 failures[f] = csConfig |
1950 for n, v in failures.iteritems(): | 1950 for n, v in failures.iteritems(): |
1951 mx.log('{0}: header does not match RegexpHeader defined in {1}'.format(n, v)) | 1951 mx.log('{0}: header does not match RegexpHeader defined in {1}'.format(n, v)) |
1952 return len(failures) | 1952 return len(failures) |
1953 | 1953 |
1954 def mx_init(suite): | 1954 mx.update_commands(_suite, { |
1955 commands = { | 1955 'build': [build, ''], |
1956 'build': [build, ''], | 1956 'buildjmh': [buildjmh, '[-options]'], |
1957 'buildjmh': [buildjmh, '[-options]'], | 1957 'buildvars': [buildvars, ''], |
1958 'buildvars': [buildvars, ''], | 1958 'buildvms': [buildvms, '[-options]'], |
1959 'buildvms': [buildvms, '[-options]'], | 1959 'c1visualizer' : [c1visualizer, ''], |
1960 'c1visualizer' : [c1visualizer, ''], | 1960 'checkheaders': [checkheaders, ''], |
1961 'checkheaders': [checkheaders, ''], | 1961 'clean': [clean, ''], |
1962 'clean': [clean, ''], | 1962 'ctw': [ctw, '[-vmoptions|noinline|nocomplex|full]'], |
1963 'ctw': [ctw, '[-vmoptions|noinline|nocomplex|full]'], | 1963 'export': [export, '[-options] [zipfile]'], |
1964 'export': [export, '[-options] [zipfile]'], | 1964 'hsdis': [hsdis, '[att]'], |
1965 'hsdis': [hsdis, '[att]'], | 1965 'hcfdis': [hcfdis, ''], |
1966 'hcfdis': [hcfdis, ''], | 1966 'igv' : [igv, ''], |
1967 'igv' : [igv, ''], | 1967 'jdkhome': [print_jdkhome, ''], |
1968 'jdkhome': [print_jdkhome, ''], | 1968 'jmh': [jmh, '[VM options] [filters|JMH-args-as-json...]'], |
1969 'jmh': [jmh, '[VM options] [filters|JMH-args-as-json...]'], | 1969 'gate' : [gate, '[-options]'], |
1970 'gate' : [gate, '[-options]'], | 1970 'makejmhdeps' : [makejmhdeps, ''], |
1971 'makejmhdeps' : [makejmhdeps, ''], | 1971 'unittest' : [unittest, '[unittest options] [--] [VM options] [filters...]', mx_unittest.unittestHelpSuffix], |
1972 'unittest' : [unittest, '[unittest options] [--] [VM options] [filters...]', mx_unittest.unittestHelpSuffix], | 1972 'shortunittest' : [shortunittest, '[unittest options] [--] [VM options] [filters...]', mx_unittest.unittestHelpSuffix], |
1973 'shortunittest' : [shortunittest, '[unittest options] [--] [VM options] [filters...]', mx_unittest.unittestHelpSuffix], | 1973 'jacocoreport' : [jacocoreport, '[output directory]'], |
1974 'jacocoreport' : [jacocoreport, '[output directory]'], | 1974 'vm': [vm, '[-options] class [args...]'], |
1975 'vm': [vm, '[-options] class [args...]'], | 1975 'deoptalot' : [deoptalot, '[n]'], |
1976 'deoptalot' : [deoptalot, '[n]'], | 1976 'longtests' : [longtests, ''], |
1977 'longtests' : [longtests, ''], | 1977 'jol' : [jol, ''], |
1978 'jol' : [jol, ''], | 1978 'makefile' : [mx_jvmci_makefile.build_makefile, 'build makefiles for JDK build'], |
1979 'makefile' : [mx_jvmci_makefile.build_makefile, 'build makefiles for JDK build'], | 1979 }) |
1980 } | 1980 |
1981 | 1981 mx.add_argument('--jacoco', help='instruments com.oracle.* classes using JaCoCo', default='off', choices=['off', 'on', 'append']) |
1982 mx.add_argument('--jacoco', help='instruments com.oracle.* classes using JaCoCo', default='off', choices=['off', 'on', 'append']) | 1982 mx.add_argument('--vmcwd', dest='vm_cwd', help='current directory will be changed to <path> before the VM is executed', default=None, metavar='<path>') |
1983 mx.add_argument('--vmcwd', dest='vm_cwd', help='current directory will be changed to <path> before the VM is executed', default=None, metavar='<path>') | 1983 mx.add_argument('--installed-jdks', help='the base directory in which the JDKs cloned from $JAVA_HOME exist. ' + |
1984 mx.add_argument('--installed-jdks', help='the base directory in which the JDKs cloned from $JAVA_HOME exist. ' + | 1984 'The VM selected by --vm and --vmbuild options is under this directory (i.e., ' + |
1985 'The VM selected by --vm and --vmbuild options is under this directory (i.e., ' + | 1985 join('<path>', '<jdk-version>', '<vmbuild>', 'jre', 'lib', '<vm>', mx.add_lib_prefix(mx.add_lib_suffix('jvm'))) + ')', default=None, metavar='<path>') |
1986 join('<path>', '<jdk-version>', '<vmbuild>', 'jre', 'lib', '<vm>', mx.add_lib_prefix(mx.add_lib_suffix('jvm'))) + ')', default=None, metavar='<path>') | 1986 |
1987 | 1987 mx.add_argument('--vm', action='store', dest='vm', choices=_vmChoices.keys(), help='the VM type to build/run') |
1988 mx.add_argument('--vm', action='store', dest='vm', choices=_vmChoices.keys(), help='the VM type to build/run') | 1988 mx.add_argument('--vmbuild', action='store', dest='vmbuild', choices=_vmbuildChoices, help='the VM build to build/run (default: ' + _vmbuildChoices[0] + ')') |
1989 mx.add_argument('--vmbuild', action='store', dest='vmbuild', choices=_vmbuildChoices, help='the VM build to build/run (default: ' + _vmbuildChoices[0] + ')') | 1989 mx.add_argument('--ecl', action='store_true', dest='make_eclipse_launch', help='create launch configuration for running VM execution(s) in Eclipse') |
1990 mx.add_argument('--ecl', action='store_true', dest='make_eclipse_launch', help='create launch configuration for running VM execution(s) in Eclipse') | 1990 mx.add_argument('--vmprefix', action='store', dest='vm_prefix', help='prefix for running the VM (e.g. "/usr/bin/gdb --args")', metavar='<prefix>') |
1991 mx.add_argument('--vmprefix', action='store', dest='vm_prefix', help='prefix for running the VM (e.g. "/usr/bin/gdb --args")', metavar='<prefix>') | 1991 mx.add_argument('--gdb', action='store_const', const='/usr/bin/gdb --args', dest='vm_prefix', help='alias for --vmprefix "/usr/bin/gdb --args"') |
1992 mx.add_argument('--gdb', action='store_const', const='/usr/bin/gdb --args', dest='vm_prefix', help='alias for --vmprefix "/usr/bin/gdb --args"') | 1992 mx.add_argument('--lldb', action='store_const', const='lldb --', dest='vm_prefix', help='alias for --vmprefix "lldb --"') |
1993 mx.add_argument('--lldb', action='store_const', const='lldb --', dest='vm_prefix', help='alias for --vmprefix "lldb --"') | |
1994 | |
1995 mx.update_commands(suite, commands) | |
1996 | 1993 |
1997 class JVMCIArchiveParticipant: | 1994 class JVMCIArchiveParticipant: |
1998 def __init__(self, dist): | 1995 def __init__(self, dist): |
1999 self.dist = dist | 1996 self.dist = dist |
2000 self.jvmciServices = {} | 1997 self.jvmciServices = {} |
2033 for service, providers in self.jvmciServices.iteritems(): | 2030 for service, providers in self.jvmciServices.iteritems(): |
2034 arcname = 'META-INF/jvmci.services/' + service | 2031 arcname = 'META-INF/jvmci.services/' + service |
2035 # Convert providers to a set before printing to remove duplicates | 2032 # Convert providers to a set before printing to remove duplicates |
2036 self.arc.zf.writestr(arcname, '\n'.join(frozenset(providers))+ '\n') | 2033 self.arc.zf.writestr(arcname, '\n'.join(frozenset(providers))+ '\n') |
2037 | 2034 |
2038 def mx_post_parse_cmd_line(opts): # | 2035 def mx_post_parse_cmd_line(opts): |
2039 # TODO _minVersion check could probably be part of a Suite in mx? | 2036 # TODO _minVersion check could probably be part of a Suite in mx? |
2040 def _versionCheck(version): | 2037 def _versionCheck(version): |
2041 return version >= _minVersion and (not _untilVersion or version >= _untilVersion) | 2038 return version >= _minVersion and (not _untilVersion or version >= _untilVersion) |
2042 versionDesc = ">=" + str(_minVersion) | 2039 versionDesc = ">=" + str(_minVersion) |
2043 if _untilVersion: | 2040 if _untilVersion: |