Mercurial > hg > truffle
comparison mx/commands.py @ 4187:ac5c2bdfcca2
Disabled copyright check in the gate until the CheckCopyright tools supports the HotSpot copyright notice format.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 03 Jan 2012 13:54:11 +0100 |
parents | 4af146831ed6 |
children | a2caa019ba3a |
comparison
equal
deleted
inserted
replaced
4186:71a2cd79c375 | 4187:ac5c2bdfcca2 |
---|---|
1 # | 1 # |
2 # commands.py - the default commands available to gl.py | 2 # commands.py - the default commands available to gl.py |
3 # | 3 # |
4 # ---------------------------------------------------------------------------------------------------- | 4 # ---------------------------------------------------------------------------------------------------- |
5 # | 5 # |
6 # Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. | 6 # Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. |
7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
8 # | 8 # |
9 # This code is free software; you can redistribute it and/or modify it | 9 # This code is free software; you can redistribute it and/or modify it |
10 # under the terms of the GNU General Public License version 2 only, as | 10 # under the terms of the GNU General Public License version 2 only, as |
11 # published by the Free Software Foundation. | 11 # published by the Free Software Foundation. |
43 os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='16') | 43 os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='16') |
44 mx.run([mx.gmake_cmd(), 'clean'], cwd=join(_graal_home, 'make')) | 44 mx.run([mx.gmake_cmd(), 'clean'], cwd=join(_graal_home, 'make')) |
45 | 45 |
46 def copyrightcheck(args): | 46 def copyrightcheck(args): |
47 """run copyright check on the Mercurial controlled source files""" | 47 """run copyright check on the Mercurial controlled source files""" |
48 mx.run_java(['-cp', mx.classpath('com.oracle.max.base', resolve=False), 'com.sun.max.tools.CheckCopyright', '-cfp=' + join(mx.project('com.oracle.max.base').dir, '.copyright.regex')] + args) | 48 res = mx.run_java(['-cp', mx.classpath('com.oracle.max.base', resolve=False), 'com.sun.max.tools.CheckCopyright', '-cfp=' + join(mx.project('com.oracle.max.base').dir, '.copyright.regex')] + args) |
49 mx.log("copyright check result = " + str(res)) | |
50 return res | |
49 | 51 |
50 def export(args): | 52 def export(args): |
51 """create a GraalVM zip file for distribution""" | 53 """create a GraalVM zip file for distribution""" |
52 | 54 |
53 parser = ArgumentParser(prog='mx export'); | 55 parser = ArgumentParser(prog='mx export'); |
547 | 549 |
548 # 4. Build | 550 # 4. Build |
549 mx.log(time.strftime('%d %b %Y %H:%M:%S - Build...')) | 551 mx.log(time.strftime('%d %b %Y %H:%M:%S - Build...')) |
550 build([]) | 552 build([]) |
551 | 553 |
552 # 5 Copyright check | 554 # 5 Copyright check (disabled until the copyrght notices in the HotSpot source files are supported by the CheckCopyright tool) |
553 mx.log(time.strftime('%d %b %Y %H:%M:%S - Running copyright check...')) | 555 #mx.log(time.strftime('%d %b %Y %H:%M:%S - Running copyright check...')) |
554 hgNode = mx.get_env('hg_node') | 556 #hgNode = mx.get_env('hg_node') |
555 if hgNode is None: | 557 #if hgNode is None: |
556 copyrightcheck(['-modified', '-reporterrors=true', '-continueonerror']) | 558 # copyrightcheck(['-modified', '-reporterrors=true', '-continueonerror']) |
557 else: | 559 #else: |
558 revTip = int(subprocess.check_output(['hg', 'tip', '--template', "'{rev}'"]).strip("'")) | 560 # revTip = int(subprocess.check_output(['hg', 'tip', '--template', "'{rev}'"]).strip("'")) |
559 revLast = int(subprocess.check_output(['hg', 'log', '-r', hgNode, '--template', "'{rev}'"]).strip("'")) | 561 # revLast = int(subprocess.check_output(['hg', 'log', '-r', hgNode, '--template', "'{rev}'"]).strip("'")) |
560 changesetCount = revTip - revLast + 1 | 562 # changesetCount = revTip - revLast + 1 |
561 mx.log(time.strftime('Checking ' + str(changesetCount) + ' changesets...')) | 563 # mx.log(time.strftime('Checking ' + str(changesetCount) + ' changesets...')) |
562 copyrightcheck(['-last=' + str(changesetCount), '-reporterrors=true', '-continueonerror']) | 564 # copyrightcheck(['-last=' + str(changesetCount), '-reporterrors=true', '-continueonerror']) |
563 raise SystemExit('forced exit') | |
564 | 565 |
565 # 6. Bootstrap with system assertions enabled | 566 # 6. Bootstrap with system assertions enabled |
566 mx.log(time.strftime('%d %b %Y %H:%M:%S - Bootstrap with -esa...')) | 567 mx.log(time.strftime('%d %b %Y %H:%M:%S - Bootstrap with -esa...')) |
567 vm(['-esa', '-version']) | 568 vm(['-esa', '-version']) |
568 | 569 |