Skip to content

Commit

Permalink
Update superpmi.py script for new 'runtime' repo layout (dotnet#541)
Browse files Browse the repository at this point in the history
Updated a few comments as well.
  • Loading branch information
BruceForstall authored Dec 5, 2019
1 parent 48c2387 commit 8f67999
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 47 deletions.
14 changes: 7 additions & 7 deletions src/coreclr/scripts/coreclr_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self,
self.arch = None
self.build_type = None
self.core_root = None
self.coreclr_repo_location = None
self.runtime_repo_location = None

self.default_build_type = default_build_type

Expand Down Expand Up @@ -205,7 +205,7 @@ def provide_default_host_os():
return None

def check_and_return_test_location(test_location):
default_test_location = os.path.join(self.coreclr_repo_location, "..", "..", "artifacts", "tests", "coreclr", "%s.%s.%s" % (self.host_os, self.arch, self.build_type))
default_test_location = os.path.join(self.runtime_repo_location, "artifacts", "tests", "coreclr", "%s.%s.%s" % (self.host_os, self.arch, self.build_type))

if os.path.isdir(default_test_location) or not self.require_built_test_dir:
return default_test_location
Expand All @@ -227,7 +227,7 @@ def check_and_return_default_core_root(core_root):
return core_root

def check_and_return_default_product_location(product_location):
default_product_location = os.path.join(self.bin_location, "Product", "%s.%s.%s" % (self.host_os, self.arch, self.build_type))
default_product_location = os.path.join(self.artifacts_location, "bin", "coreclr", "%s.%s.%s" % (self.host_os, self.arch, self.build_type))

if os.path.isdir(default_product_location) or not self.require_built_product_dir:
return default_product_location
Expand All @@ -236,8 +236,8 @@ def check_and_return_default_product_location(product_location):

return product_location

self.coreclr_repo_location = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
self.bin_location = os.path.join(self.coreclr_repo_location, "artifacts")
self.runtime_repo_location = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
self.artifacts_location = os.path.join(self.runtime_repo_location, "artifacts")

self.verify(args,
"host_os",
Expand All @@ -248,7 +248,7 @@ def check_and_return_default_product_location(product_location):
self.verify(args,
"arch",
check_arch,
"Unsupported architecture: %s.\nSupported architectures: %s" % (args.arch, ", ".join(self.valid_arches)))
"Unsupported architecture.\nSupported architectures: %s" % (", ".join(self.valid_arches)))

self.verify(args,
"build_type",
Expand All @@ -269,4 +269,4 @@ def check_and_return_default_product_location(product_location):
self.verify(args,
"product_location",
check_and_return_default_product_location,
"Error, incorrect product_location.")
"Error, incorrect product_location.")
Loading

0 comments on commit 8f67999

Please sign in to comment.