Mercurial > hg > graal-compiler
changeset 21936:11f241f26c61
mx: add check to gate the jvmci.make and suite.py are in sync
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 12 Jun 2015 01:06:36 +0200 |
parents | f37da0c82e78 |
children | 3a292e8b9e51 |
files | mx/mx_graal.py mx/mx_graal_makefile.py |
diffstat | 2 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mx/mx_graal.py Fri Jun 12 01:02:57 2015 +0200 +++ b/mx/mx_graal.py Fri Jun 12 01:06:36 2015 +0200 @@ -1734,6 +1734,12 @@ with Task('Pylint', tasks) as t: if t: mx.pylint([]) + with Task('Check jvmci.make in sync with suite.py', tasks) as t: + if t: + jvmciMake = join(_graal_home, 'make', 'jvmci.make') + if mx_graal_makefile.build_makefile(['-o', jvmciMake]) != 0: + t.abort('Rerun "mx makefile -o ' + jvmciMake + ' and check-in the modified ' + jvmciMake) + def _clean(name='Clean'): with Task(name, tasks) as t: if t: @@ -1761,7 +1767,7 @@ if t: mx.log(time.strftime('%d %b %Y %H:%M:%S - Ensuring mx/projects files are canonicalized...')) if mx.canonicalizeprojects([]) != 0: - t.abort('Rerun "mx canonicalizeprojects" and check-in the modified mx/projects files.') + t.abort('Rerun "mx canonicalizeprojects" and check-in the modified mx/suite*.py files.') if mx.get_env('JDT'): with Task('BuildJavaWithEcj', tasks):
--- a/mx/mx_graal_makefile.py Fri Jun 12 01:02:57 2015 +0200 +++ b/mx/mx_graal_makefile.py Fri Jun 12 01:06:36 2015 +0200 @@ -44,7 +44,9 @@ def build_makefile(args): - """Creates a Makefile which is able to build distributions without mx""" + """Creates a Makefile which is able to build distributions without mx + + The return value indicates how many files were modified""" parser = ArgumentParser(prog='mx makefile') parser.add_argument('-o', action='store', dest='output', help='Write contents to this file.') parser.add_argument('selectedDists', help="Selected distribution names which are going to be built with make.", nargs=REMAINDER) @@ -59,9 +61,9 @@ if opts.output == None: print contents else: - with open(opts.output, "w") as f: - f.write(contents) - + if mx.update_file(opts.output, contents): + return 1 + return 0 def filter_projects(deps, t): def typeFilter(project): # filters @@ -166,7 +168,6 @@ JAVAC=$(ABS_BOOTDIR)/bin/javac -g -target """ + str(java.javaCompliance) + """ JAR=$(ABS_BOOTDIR)/bin/jar -EXPORTED_FILES_ADDITIONAL=$(TARGET)/options $(TARGET)/services HS_COMMON_SRC=. # Directories, where the generated property-files reside within the JAR files