From 3ffc91331ac381d904638981563ace8a181c8b9b Mon Sep 17 00:00:00 2001 From: Andy Ayers Date: Wed, 19 Apr 2017 14:07:24 -0700 Subject: [PATCH] Update CheckProjects to not fail for non-dev CORE_ROOT CheckProjects expects to be able to find the jit test project files relative to the value of the `CORE_ROOT` environment variable. This fails when we have test setups like cross-tests or helix where the test binary tree has been copied away from the repo after building. Tolerate these cases by returning a success code if the `CORE_ROOT` path is not pointing at the expected place. Fixes dotnet/coreclr#11079. Fixes dotnet/coreclr#10635. Commit migrated from https://github.com/dotnet/coreclr/commit/6521f0772322420d9b9e8528e9c121131808749e --- src/coreclr/tests/src/JIT/CheckProjects/CheckProjects.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/coreclr/tests/src/JIT/CheckProjects/CheckProjects.cs b/src/coreclr/tests/src/JIT/CheckProjects/CheckProjects.cs index dc44d2e..be42ab9 100644 --- a/src/coreclr/tests/src/JIT/CheckProjects/CheckProjects.cs +++ b/src/coreclr/tests/src/JIT/CheckProjects/CheckProjects.cs @@ -52,9 +52,9 @@ internal class ScanProjectFiles if (binIndex < 0) { - Console.WriteLine("CORE_ROOT must be set to full path to repo test dir; was '{0}'.", - coreRoot); - return -1; + Console.WriteLine("No bin directory found in CORE_ROOT path `{0}`," + + " so no checking will be performed.", coreRoot); + return 100; } string repoRoot = coreRoot.Substring(0, binIndex); @@ -78,8 +78,8 @@ internal class ScanProjectFiles if (!Directory.Exists(projectRoot)) { - Console.WriteLine("Project directory does not exist"); - return -1; + Console.WriteLine("Project directory does not exist, so no checking will be performed."); + return 100; } DirectoryInfo projectRootDir = new DirectoryInfo(projectRoot); -- 2.7.4