summaryrefslogtreecommitdiff
path: root/tests/scripts/arm64_post_build.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/arm64_post_build.py')
-rw-r--r--tests/scripts/arm64_post_build.py51
1 files changed, 47 insertions, 4 deletions
diff --git a/tests/scripts/arm64_post_build.py b/tests/scripts/arm64_post_build.py
index 4ed8032fc2..62818c433b 100644
--- a/tests/scripts/arm64_post_build.py
+++ b/tests/scripts/arm64_post_build.py
@@ -34,8 +34,7 @@ from collections import defaultdict
g_arm64ci_path = os.path.join(os.environ["USERPROFILE"], "bin")
g_dotnet_url = "https://go.microsoft.com/fwlink/?LinkID=831469"
-g_test_url = "https://clrjit.blob.core.windows.net/arm64ci/CoreCLR-Pri1Testing.zip"
-g_x64_client_url = "https://clrjit.blob.core.windows.net/arm64ci/x64_client.zip"
+g_x64_client_url = "https://clrjit.blob.core.windows.net/arm64ci/x64_client_live_tests.zip"
################################################################################
# Argument Parser
@@ -88,6 +87,34 @@ def copy_core_root(core_root):
except OSError as error:
log("Core Root not copied. Error: %s" % error)
+ sys.exit(1)
+
+ return new_location
+
+def copy_tests(test_location):
+ """ Copy the test directory to the current dir as "tests"
+ Args:
+ test_location (str): location of the tests directory
+ Returns:
+ copy_location (str): name of the location, for now hardcoded to tests
+ : for backcompat in the old system
+ """
+
+ new_location = "tests"
+
+ # Delete used instances.
+ if os.path.isdir(new_location):
+ try:
+ shutil.rmtree(new_location)
+ except:
+ assert not os.path.isdir(new_location)
+
+ try:
+ shutil.copytree(test_location, new_location)
+
+ except OSError as error:
+ log("Test location not copied. Error: %s" % error)
+ sys.exit(1)
return new_location
@@ -249,15 +276,28 @@ def validate_args(args):
def main(args):
global g_arm64ci_path
- global g_test_url
repo_root, arch, build_type, scenario, key_location, force_update = validate_args(args)
+ cwd = os.getcwd()
+ os.chdir(repo_root)
+
+ runtest_location = os.path.join(repo_root, "tests", "runtest.cmd")
+ args = [runtest_location, "GenerateLayoutOnly", arch, build_type]
+ subprocess.check_call(args)
+
+ os.chdir(cwd)
+
core_root = os.path.join(repo_root,
"bin",
"Product",
"Windows_NT.%s.%s" % (arch, build_type))
+ test_location = os.path.join(repo_root,
+ "bin",
+ "tests",
+ "Windows_NT.%s.%s" % (arch, build_type))
+
cli_location = setup_cli(force_update=force_update)
add_item_to_path(cli_location)
@@ -269,6 +309,9 @@ def main(args):
core_root = copy_core_root(core_root)
log("Copied core_root to %s." % core_root)
+ test_location = copy_tests(test_location)
+ log("Copied test location to %s." % test_location)
+
# Make sure the lst file is copied into the core_root
lst_file = os.path.join(repo_root, "tests", arch, "Tests.lst")
shutil.copy2(lst_file, core_root)
@@ -280,7 +323,7 @@ def main(args):
build_type,
scenario,
core_root,
- g_test_url]
+ test_location]
log(" ".join(args))
proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)