From: Jan Vorlicek Date: Wed, 13 Nov 2019 17:04:37 +0000 (+0100) Subject: Make SuperILC to execute .cmd/.sh only (dotnet/coreclr#27854) X-Git-Tag: submit/tizen/20210909.063632~11030^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18c7ac1074790a9723150e3122edcee2e5061e59;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Make SuperILC to execute .cmd/.sh only (dotnet/coreclr#27854) Until now, SuperILC was executing both .cmd/.sh files of tests and .exe files it has found in the test folders that didn't match the .cmd/.sh file names. This is different from how coreclr tests are run in regular test runs. Only the .cmd/.sh files should be executed, the .exe files with names not matching the .cmd/.sh files are always just helper applications used by the tests and not the main test executables. This change updates SuperILC to execute only the .cmd / .sh, thus getting rid of about 5 failures from the coreclr pri 1 test runs. Commit migrated from https://github.com/dotnet/coreclr/commit/76751786c52895a96dac39e83570d14bb2b42b49 --- diff --git a/src/coreclr/src/tools/ReadyToRun.SuperIlc/BuildFolder.cs b/src/coreclr/src/tools/ReadyToRun.SuperIlc/BuildFolder.cs index 1a52c40..d5f1080 100644 --- a/src/coreclr/src/tools/ReadyToRun.SuperIlc/BuildFolder.cs +++ b/src/coreclr/src/tools/ReadyToRun.SuperIlc/BuildFolder.cs @@ -59,13 +59,10 @@ namespace ReadyToRun.SuperIlc if (!options.NoExe) { - HashSet scriptedExecutables = new HashSet(StringComparer.OrdinalIgnoreCase); - foreach (string script in _executionScripts ?? Enumerable.Empty()) { ProcessInfo[] scriptExecutions = new ProcessInfo[(int)CompilerIndex.Count]; _executions.Add(scriptExecutions); - scriptedExecutables.Add(Path.ChangeExtension(script, ".exe")); foreach (CompilerRunner runner in compilerRunners) { @@ -81,35 +78,6 @@ namespace ReadyToRun.SuperIlc scriptExecutions[(int)runner.Index] = new ProcessInfo(new ScriptExecutionProcessConstructor(runner, _outputFolder, script, modules, folders)); } } - - if (options.CoreRootDirectory != null) - { - foreach (string mainExe in _mainExecutables ?? Enumerable.Empty()) - { - if (scriptedExecutables.Contains(mainExe)) - { - // Skip direct exe launch assuming it was run by the corresponding cmd script - continue; - } - - ProcessInfo[] appExecutions = new ProcessInfo[(int)CompilerIndex.Count]; - _executions.Add(appExecutions); - foreach (CompilerRunner runner in compilerRunners) - { - HashSet modules = new HashSet(StringComparer.OrdinalIgnoreCase); - HashSet folders = new HashSet(StringComparer.OrdinalIgnoreCase); - - modules.Add(mainExe); - modules.Add(runner.GetOutputFileName(_outputFolder, mainExe)); - modules.UnionWith(_compilationInputFiles); - modules.UnionWith(_compilationInputFiles.Select(file => runner.GetOutputFileName(_outputFolder, file))); - folders.Add(Path.GetDirectoryName(mainExe)); - folders.UnionWith(runner.ReferenceFolders); - - appExecutions[(int)runner.Index] = new ProcessInfo(new AppExecutionProcessConstructor(runner, _outputFolder, mainExe, modules, folders)); - } - } - } } }