diff options
author | Michelle McDaniel <adiaaida@gmail.com> | 2016-09-22 08:58:47 -0700 |
---|---|---|
committer | Michelle McDaniel <adiaaida@gmail.com> | 2016-09-22 08:58:47 -0700 |
commit | b4f55f2c03cda410607872fd62247c52b1a8eeb6 (patch) | |
tree | fd2ff234feabe49b3bc908ab81eae5ec5cd3470a /tests | |
parent | cbb38ce37524a101d31277810a7c358678f9bc3a (diff) | |
download | coreclr-b4f55f2c03cda410607872fd62247c52b1a8eeb6.tar.gz coreclr-b4f55f2c03cda410607872fd62247c52b1a8eeb6.tar.bz2 coreclr-b4f55f2c03cda410607872fd62247c52b1a8eeb6.zip |
Improve formatting job output
To make it more clear where there are formatting errors, have format.py
print what commands the user needs to run to fix the formatting errors in
their PR.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scripts/format.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/scripts/format.py b/tests/scripts/format.py index 71f46e304a..b1957f34d8 100644 --- a/tests/scripts/format.py +++ b/tests/scripts/format.py @@ -186,14 +186,20 @@ def main(argv): jitformat = os.path.join(jitformat, "jit-format") elif platform == 'Windows_NT': jitformat = os.path.join(jitformat,"jit-format.cmd") + errorMessage = "" - for build in ["Checked", "Debug", "Release"]: - for project in ["dll", "standalone", "crossgen"]: + builds = ["Checked", "Debug", "Release"] + projects = ["dll", "standalone", "crossgen"] + + for build in builds: + for project in projects: proc = subprocess.Popen([jitformat, "-a", arch, "-b", build, "-o", platform, "-c", coreclr, "--verbose", "--projects", project], env=my_env) output,error = proc.communicate() errorcode = proc.returncode if errorcode != 0: + errorMessage += "\tjit-format -a " + arch + " -b " + build + " -o " + platform + errorMessage += " -c <absolute-path-to-coreclr> --verbose --fix --projects " + project +"\n" returncode = errorcode os.chdir(current_dir) @@ -210,6 +216,10 @@ def main(argv): print("Deleting " + bootstrapPath) os.remove(bootstrapPath) + if returncode != 0: + print("There were errors in formatting. Please run jit-format locally with: \n") + print(errorMessage) + return returncode if __name__ == '__main__': |