Skip to content

Commit 4a2d9cf

Browse files
committed
fix test execution directory
1 parent e8a8ccd commit 4a2d9cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/TestSettings.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System.Globalization;
5+
using Microsoft.NET.TestFramework;
56

67
namespace Microsoft.NET.Build.Containers.IntegrationTests;
78

@@ -23,7 +24,7 @@ internal static string TestArtifactsDirectory
2324
{
2425
if(_testArtifactsDir == null)
2526
{
26-
string tmpDir = Path.Combine(Path.GetTempPath(), "ContainersTests", DateTime.Now.ToString("yyyyMMddHHmmssfff", CultureInfo.InvariantCulture));
27+
string tmpDir = Path.Combine(TestContext.Current.TestExecutionDirectory, "ContainersTests", DateTime.Now.ToString("yyyyMMddHHmmssfff", CultureInfo.InvariantCulture));
2728
if (!Directory.Exists(tmpDir))
2829
{
2930
Directory.CreateDirectory(tmpDir);

0 commit comments

Comments
 (0)