Mercurial > hg > graal-jvmci-8
comparison mx/mx_graal.py @ 18635:a8b46348b79f
mx: converted format strings to be python 2.6 compliant
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 05 Dec 2014 08:20:06 +0100 |
parents | 8c3a85077f84 |
children | d5d1fbe270e9 |
comparison
equal
deleted
inserted
replaced
18634:b4071daf1892 | 18635:a8b46348b79f |
---|---|
753 | 753 |
754 if opts2.export_dir is not None: | 754 if opts2.export_dir is not None: |
755 if not exists(opts2.export_dir): | 755 if not exists(opts2.export_dir): |
756 os.makedirs(opts2.export_dir) | 756 os.makedirs(opts2.export_dir) |
757 else: | 757 else: |
758 assert os.path.isdir(opts2.export_dir), '{} is not a directory'.format(opts2.export_dir) | 758 assert os.path.isdir(opts2.export_dir), '{0} is not a directory'.format(opts2.export_dir) |
759 | 759 |
760 defsPath = join(_graal_home, 'make', 'defs.make') | 760 defsPath = join(_graal_home, 'make', 'defs.make') |
761 with open(defsPath) as fp: | 761 with open(defsPath) as fp: |
762 defs = fp.read() | 762 defs = fp.read() |
763 for jdkDist in _jdkDeployedDists: | 763 for jdkDist in _jdkDeployedDists: |
1833 artifactId = d['artifactId'] | 1833 artifactId = d['artifactId'] |
1834 groupId = d['groupId'] | 1834 groupId = d['groupId'] |
1835 deps = d['deps'] | 1835 deps = d['deps'] |
1836 makejmhdep(artifactId, groupId, deps) | 1836 makejmhdep(artifactId, groupId, deps) |
1837 except ValueError as e: | 1837 except ValueError as e: |
1838 mx.abort('Error parsing {}:\n{}'.format(f, e)) | 1838 mx.abort('Error parsing {0}:\n{1}'.format(f, e)) |
1839 | 1839 |
1840 def buildjmh(args): | 1840 def buildjmh(args): |
1841 """build the JMH benchmarks""" | 1841 """build the JMH benchmarks""" |
1842 | 1842 |
1843 parser = ArgumentParser(prog='mx buildjmh') | 1843 parser = ArgumentParser(prog='mx buildjmh') |
1914 if v is None: | 1914 if v is None: |
1915 del jmhArgs[n] | 1915 del jmhArgs[n] |
1916 else: | 1916 else: |
1917 jmhArgs[n] = v | 1917 jmhArgs[n] = v |
1918 except ValueError as e: | 1918 except ValueError as e: |
1919 mx.abort('error parsing JSON input: {}\n{}'.format(j, e)) | 1919 mx.abort('error parsing JSON input: {0}\n{1}'.format(j, e)) |
1920 | 1920 |
1921 jmhPath = _get_jmh_path() | 1921 jmhPath = _get_jmh_path() |
1922 mx.log('Using benchmarks in ' + jmhPath) | 1922 mx.log('Using benchmarks in ' + jmhPath) |
1923 | 1923 |
1924 matchedSuites = set() | 1924 matchedSuites = set() |
2308 with open(f) as fp: | 2308 with open(f) as fp: |
2309 content = fp.read() | 2309 content = fp.read() |
2310 if not matcher.match(content): | 2310 if not matcher.match(content): |
2311 failures[f] = csConfig | 2311 failures[f] = csConfig |
2312 for n, v in failures.iteritems(): | 2312 for n, v in failures.iteritems(): |
2313 mx.log('{}: header does not match RegexpHeader defined in {}'.format(n, v)) | 2313 mx.log('{0}: header does not match RegexpHeader defined in {0}'.format(n, v)) |
2314 return len(failures) | 2314 return len(failures) |
2315 | 2315 |
2316 def mx_init(suite): | 2316 def mx_init(suite): |
2317 commands = { | 2317 commands = { |
2318 'build': [build, ''], | 2318 'build': [build, ''], |