Find dotnet under tests from the dotnet executing the test
This commit is contained in:
parent
3a58cac351
commit
f6f43f6aa2
2 changed files with 29 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||
|
@ -9,7 +8,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
public sealed class DotnetCommand : TestCommand
|
||||
{
|
||||
public DotnetCommand()
|
||||
: base("dotnet")
|
||||
: base(DotnetUnderTest.FullName)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||
{
|
||||
public static class DotnetUnderTest
|
||||
{
|
||||
static string _pathToDotnetUnderTest;
|
||||
|
||||
public static string FullName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_pathToDotnetUnderTest == null)
|
||||
{
|
||||
_pathToDotnetUnderTest = new Muxer().MuxerPath;
|
||||
}
|
||||
|
||||
Console.WriteLine($"Executing tests against {_pathToDotnetUnderTest}");
|
||||
|
||||
return _pathToDotnetUnderTest;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue