Esempio n. 1
0
        static BuildTestBase()
        {
            s_buildEnv             = new BuildEnvironment();
            s_runtimePackPathRegex = new Regex(s_runtimePackPathPattern);

            s_skipProjectCleanup = !string.IsNullOrEmpty(EnvironmentVariables.SkipProjectCleanup) && EnvironmentVariables.SkipProjectCleanup == "1";

            if (string.IsNullOrEmpty(EnvironmentVariables.XHarnessCliPath))
            {
                s_xharnessRunnerCommand = "xharness";
            }
            else
            {
                s_xharnessRunnerCommand = EnvironmentVariables.XHarnessCliPath;
            }

            string?nugetPackagesPath = Environment.GetEnvironmentVariable("NUGET_PACKAGES");

            if (!string.IsNullOrEmpty(nugetPackagesPath))
            {
                if (!Directory.Exists(nugetPackagesPath))
                {
                    Directory.CreateDirectory(nugetPackagesPath);
                }
            }

            Console.WriteLine("");
            Console.WriteLine($"==============================================================================================");
            Console.WriteLine($"=============== Running with {(s_buildEnv.IsWorkload ? "Workloads" : "EMSDK")} ===============");
            Console.WriteLine($"==============================================================================================");
            Console.WriteLine("");
        }
Esempio n. 2
0
 public DotNetCommand(BuildEnvironment buildEnv, ITestOutputHelper _testOutput, bool useDefaultArgs = true, string label = "") : base(buildEnv.DotNet, _testOutput, label)
 {
     _buildEnvironment = buildEnv;
     _useDefaultArgs   = useDefaultArgs;
     if (useDefaultArgs)
     {
         WithEnvironmentVariables(buildEnv.EnvVars);
     }
 }
Esempio n. 3
0
        static BuildTestBase()
        {
            s_buildEnv             = new BuildEnvironment();
            s_runtimePackPathRegex = new Regex(s_runtimePackPathPattern);

            string?cleanupVar = Environment.GetEnvironmentVariable(SkipProjectCleanupEnvVar);

            s_skipProjectCleanup = !string.IsNullOrEmpty(cleanupVar) && cleanupVar == "1";

            s_xharnessRunnerCommand = GetEnvironmentVariableOrDefault(XHarnessRunnerCommandEnvVar, "xharness");

            string?nugetPackagesPath = Environment.GetEnvironmentVariable("NUGET_PACKAGES");

            if (!string.IsNullOrEmpty(nugetPackagesPath))
            {
                if (!Directory.Exists(nugetPackagesPath))
                {
                    Directory.CreateDirectory(nugetPackagesPath);
                    Console.WriteLine($"-- Created {nugetPackagesPath}");
                }
                else
                {
                    Console.WriteLine($"-- already exists {nugetPackagesPath}");
                }
            }
            else
            {
                Console.WriteLine($"-- NUGET_PACKAGES envvar was empty");
            }

            Console.WriteLine("");
            Console.WriteLine($"==============================================================================================");
            Console.WriteLine($"=============== Running with {(s_buildEnv.IsWorkload ? "Workloads" : "EMSDK")} ===============");
            Console.WriteLine($"==============================================================================================");
            Console.WriteLine("");
        }