From: Andy Ayers Date: Wed, 19 Apr 2017 21:07:24 +0000 (-0700) Subject: Update CheckProjects to not fail for non-dev CORE_ROOT X-Git-Tag: submit/tizen/20210909.063632~11030^2~7187^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ffc91331ac381d904638981563ace8a181c8b9b;p=platform%2Fupstream%2Fdotnet%2Fruntime.git 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 --- 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);