public Process SpawnSupportProcess(SupportTestKind teskKind)
        {
            string supportProcessPath = Path.Combine(TEST_SUPPORT_PROCESS_PATH, _platformFolder, _targetFolder, TEST_SUPPORT_PROCESS_EXE_NAME);

            if (!File.Exists(supportProcessPath))
            {
                _testContext.WriteLine($"The support process executable could not be located at {supportProcessPath}.");
                throw new FileNotFoundException($"The support process executable could not be located at {supportProcessPath}.");
            }

            return(SpawnProcess(supportProcessPath, teskKind.ToString()));
        }
示例#2
0
        public Process SpawnSupportProcess(SupportTestKind teskKind)
        {
            string supportProcessPath = Path.Combine(TEST_SUPPORT_PROCESS_PATH, _platformFolder, _targetFolder, "net6.0", TEST_SUPPORT_PROCESS_EXE_NAME);

            supportProcessPath = Path.GetFullPath(supportProcessPath);
            Console.WriteLine(supportProcessPath);
            if (!File.Exists(supportProcessPath))
            {
                supportProcessPath = Path.Combine(TEST_SUPPORT_PROCESS_PATH, _targetFolder, "net6.0", _runtime, TEST_SUPPORT_PROCESS_EXE_NAME);

                if (!File.Exists(supportProcessPath))
                {
                    _testContext.WriteLine($"The support process executable could not be located at {supportProcessPath}.");
                    throw new FileNotFoundException($"The support process executable could not be located at {supportProcessPath}.");
                }
            }
#if Linux || OSX
            var arguments = supportProcessPath + " " + teskKind.ToString();

            return(SpawnProcess("dotnet", arguments));
#else
            return(SpawnProcess(supportProcessPath, teskKind.ToString()));
#endif
        }