diff options
author | jashook <jashoo@microsoft.com> | 2017-05-05 11:10:12 -0700 |
---|---|---|
committer | jashook <jashoo@microsoft.com> | 2017-05-11 12:52:23 -0700 |
commit | 9004feee78284250c0193fc816eb0313231dd6ab (patch) | |
tree | dc3451c5cbc46e087ff0dafcfbeb28b7f0f2e11e /tests | |
parent | c84237673b6167ee964ba6bea00041dac9dca3e2 (diff) | |
download | coreclr-9004feee78284250c0193fc816eb0313231dd6ab.tar.gz coreclr-9004feee78284250c0193fc816eb0313231dd6ab.tar.bz2 coreclr-9004feee78284250c0193fc816eb0313231dd6ab.zip |
Windows Arm64 - Build/Run tests in CI
Build tests with arm64 runs and upload/run them to the arm64 test
machines.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/runtest.cmd | 4 | ||||
-rw-r--r-- | tests/scripts/arm64_post_build.py | 51 |
2 files changed, 51 insertions, 4 deletions
diff --git a/tests/runtest.cmd b/tests/runtest.cmd index 6d8728332b..d500c53289 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -60,6 +60,7 @@ if /i "%1" == "-help" goto Usage if /i "%1" == "x64" (set __BuildArch=x64&set __MSBuildBuildArch=x64&shift&goto Arg_Loop) if /i "%1" == "x86" (set __BuildArch=x86&set __MSBuildBuildArch=x86&shift&goto Arg_Loop) if /i "%1" == "arm" (set __BuildArch=arm&set __MSBuildBuildArch=arm&shift&goto Arg_Loop) +if /i "%1" == "arm64" (set __BuildArch=arm64&set __MSBuildBuildArch=arm64&shift&goto Arg_Loop) if /i "%1" == "debug" (set __BuildType=Debug&shift&goto Arg_Loop) if /i "%1" == "release" (set __BuildType=Release&shift&goto Arg_Loop) @@ -201,6 +202,8 @@ call :PrecompileFX :SkipPrecompileFX if defined __GenerateLayoutOnly ( + REM Delete the unecessary mscorlib.ni file. + del %CORE_ROOT%\mscorlib.ni.dll exit /b 0 ) @@ -235,6 +238,7 @@ if "%__CollectDumps%"=="true" ( echo %__MsgPrefix%CORE_ROOT that will be used is: %CORE_ROOT% echo %__MsgPrefix%Starting the test run ... +REM Delete the unecessary mscorlib.ni file. del %CORE_ROOT%\mscorlib.ni.dll set __BuildLogRootName=TestRunResults 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) |