From 5624a77176db4fe7d36038d7ce6204970d2c5337 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Mon, 9 Dec 2024 13:59:01 +0100 Subject: [PATCH] C#: Use TEST_TEMPDIR when set for test files. --- csharp/extractor/Semmle.Util.Tests/LongPaths.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/extractor/Semmle.Util.Tests/LongPaths.cs b/csharp/extractor/Semmle.Util.Tests/LongPaths.cs index 1c0d5e2ce139..c1583e275036 100644 --- a/csharp/extractor/Semmle.Util.Tests/LongPaths.cs +++ b/csharp/extractor/Semmle.Util.Tests/LongPaths.cs @@ -12,7 +12,7 @@ namespace SemmleTests.Semmle.Util /// public sealed class LongPaths : IDisposable { - private static readonly string tmpDir = Path.GetTempPath(); + private static readonly string tmpDir = Environment.GetEnvironmentVariable("TEST_TMPDIR") ?? Path.GetTempPath(); private static readonly string shortPath = Path.Combine(tmpDir, "test.txt"); private static readonly string longPath = Path.Combine(tmpDir, "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "ccccccccccccccccccccccccccccccc", "ddddddddddddddddddddddddddddddddddddd", "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "fffffffffffffffffffffffffffffffff",