dotnet-installer/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs
Marc Paine c3da28feba
Update 6.0.2xx with the current state of 1xx (#13244)
* Update .vsts-ci.yml

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220205.1 (#13179)

[release/6.0.1xx] Update dependencies from dotnet/source-build-reference-packages

* Override Microsoft.Net.Sdk.WindowsDesktop references during source-build in Roslyn (#13093)

* override SDK for Microsoft.Net.Sdk.WindowsDesktop references in roslyn

* add new EmptySdk in the source build tarball

* remove roslyn solution filter patch

* Update dependencies from https://github.com/dotnet/arcade build 20220207.2 (#13186)

Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
 From Version 6.0.0-beta.22102.3 -> To Version 6.0.0-beta.22107.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* [release/6.0.1xx] Windows SDK projection update

* Update asp.net templates (#13193)

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220210.1 (#13215)

[release/6.0.1xx] Update dependencies from dotnet/source-build-reference-packages

* Add test to compare msft and sb sdk contents (#13153)

* Update to SDK and previously-source-built 6.0.102. (#13221)

* Add CentOS Stream 9 container to CI matrix (#12955)

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220215.1 (#13229)

[release/6.0.1xx] Update dependencies from dotnet/source-build-reference-packages

* Gather additional smoke test prereqs (#13233)

* Remove bootstrapping for CI builds now that we use CentOS7 previously-source-built (#13232)

* Update Version.Details.xml

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20220303.2

Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 6.0.0-servicing.22151.1 -> To Version 6.0.0-servicing.22153.2

Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Logan Bussell <loganbussell@microsoft.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Sean Reeser <v-seanreeser@microsoft.com>
Co-authored-by: Manodasan Wignarajah <mawign@microsoft.com>
Co-authored-by: William Godbe <wigodbe@microsoft.com>
Co-authored-by: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com>
Co-authored-by: Michael Simons <msimons@microsoft.com>
Co-authored-by: Chris Rummel <crummel@microsoft.com>
Co-authored-by: Omair Majid <omajid@redhat.com>
2022-03-04 20:43:03 -06:00

44 lines
1.5 KiB
C#

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics;
using System.IO;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
internal class DotNetHelper
{
private static readonly object s_lockObj = new object();
public string DotNetPath { get; }
public DotNetHelper(ITestOutputHelper outputHelper)
{
lock (s_lockObj)
{
if (!Directory.Exists(Config.DotNetDirectory))
{
if (!File.Exists(Config.DotNetTarballPath))
{
throw new InvalidOperationException($"Tarball path '{Config.DotNetTarballPath}' specified in {Config.DotNetTarballPathEnv} does not exist.");
}
Directory.CreateDirectory(Config.DotNetDirectory);
ExecuteHelper.ExecuteProcessValidateExitCode("tar", $"xzf {Config.DotNetTarballPath} -C {Config.DotNetDirectory}", outputHelper);
}
}
DotNetPath = Path.Combine(Config.DotNetDirectory, "dotnet");
}
public void ExecuteDotNetCmd(string args, ITestOutputHelper outputHelper)
{
(Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess(DotNetPath, args, outputHelper);
Assert.Equal(0, executeResult.Process.ExitCode);
}
}