3434
3535g_arm64ci_path = os .path .join (os .environ ["USERPROFILE" ], "bin" )
3636g_dotnet_url = "https://go.microsoft.com/fwlink/?LinkID=831469"
37- g_test_url = "https://clrjit.blob.core.windows.net/arm64ci/CoreCLR-Pri1Testing.zip"
38- g_x64_client_url = "https://clrjit.blob.core.windows.net/arm64ci/x64_client.zip"
37+ g_x64_client_url = "https://clrjit.blob.core.windows.net/arm64ci/x64_client_live_tests.zip"
3938
4039################################################################################
4140# Argument Parser
@@ -88,6 +87,34 @@ def copy_core_root(core_root):
8887
8988 except OSError as error :
9089 log ("Core Root not copied. Error: %s" % error )
90+ sys .exit (1 )
91+
92+ return new_location
93+
94+ def copy_tests (test_location ):
95+ """ Copy the test directory to the current dir as "tests"
96+ Args:
97+ test_location (str): location of the tests directory
98+ Returns:
99+ copy_location (str): name of the location, for now hardcoded to tests
100+ : for backcompat in the old system
101+ """
102+
103+ new_location = "tests"
104+
105+ # Delete used instances.
106+ if os .path .isdir (new_location ):
107+ try :
108+ shutil .rmtree (new_location )
109+ except :
110+ assert not os .path .isdir (new_location )
111+
112+ try :
113+ shutil .copytree (test_location , new_location )
114+
115+ except OSError as error :
116+ log ("Test location not copied. Error: %s" % error )
117+ sys .exit (1 )
91118
92119 return new_location
93120
@@ -249,15 +276,28 @@ def validate_arg(arg, check):
249276
250277def main (args ):
251278 global g_arm64ci_path
252- global g_test_url
253279
254280 repo_root , arch , build_type , scenario , key_location , force_update = validate_args (args )
255281
282+ cwd = os .getcwd ()
283+ os .chdir (repo_root )
284+
285+ runtest_location = os .path .join (repo_root , "tests" , "runtest.cmd" )
286+ args = [runtest_location , "GenerateLayoutOnly" , arch , build_type ]
287+ subprocess .check_call (args )
288+
289+ os .chdir (cwd )
290+
256291 core_root = os .path .join (repo_root ,
257292 "bin" ,
258293 "Product" ,
259294 "Windows_NT.%s.%s" % (arch , build_type ))
260295
296+ test_location = os .path .join (repo_root ,
297+ "bin" ,
298+ "tests" ,
299+ "Windows_NT.%s.%s" % (arch , build_type ))
300+
261301 cli_location = setup_cli (force_update = force_update )
262302 add_item_to_path (cli_location )
263303
@@ -269,6 +309,9 @@ def main(args):
269309 core_root = copy_core_root (core_root )
270310 log ("Copied core_root to %s." % core_root )
271311
312+ test_location = copy_tests (test_location )
313+ log ("Copied test location to %s." % test_location )
314+
272315 # Make sure the lst file is copied into the core_root
273316 lst_file = os .path .join (repo_root , "tests" , arch , "Tests.lst" )
274317 shutil .copy2 (lst_file , core_root )
@@ -280,7 +323,7 @@ def main(args):
280323 build_type ,
281324 scenario ,
282325 core_root ,
283- g_test_url ]
326+ test_location ]
284327
285328 log (" " .join (args ))
286329 proc = subprocess .Popen (args , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
0 commit comments