From eb8dae1c33dc8f7fcc8c6e574a164720a9a15f62 Mon Sep 17 00:00:00 2001 From: Michelle McDaniel Date: Wed, 21 Sep 2016 11:18:21 -0700 Subject: Fix formatting job for Ubuntu The change to move to the newer version of the CLI for coreclr causes something to look for a config.json file in the current directory (rather than the directory where the build.sh script resides), forcing build.sh to be run from the base coreclr dir (you can't run it from any other location), so changing directories to the jitutils bin directory would cause the build to fail, failing the jit-format run. This change fixes the format.py script to build the full path to the jit-format executable and then run it from the coreclr directory, rather than changing to the utils bin dir and running jit-format from there. --- tests/scripts/format.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/scripts/format.py b/tests/scripts/format.py index 50a0d3dc70..71f46e304a 100644 --- a/tests/scripts/format.py +++ b/tests/scripts/format.py @@ -176,18 +176,16 @@ def main(argv): my_env["PATH"] += os.pathsep + jitutilsBin current_dir = os.getcwd() - if os.path.isdir(jitutilsBin): - os.chdir(jitutilsBin) - else: + if not os.path.isdir(jitutilsBin): print("Jitutils not built!") return -1 - jitformat = "" + jitformat = jitutilsBin if platform == 'Linux' or platform == 'OSX': - jitformat = "jit-format" + jitformat = os.path.join(jitformat, "jit-format") elif platform == 'Windows_NT': - jitformat = "jit-format.cmd" + jitformat = os.path.join(jitformat,"jit-format.cmd") for build in ["Checked", "Debug", "Release"]: for project in ["dll", "standalone", "crossgen"]: -- cgit v1.2.3