C#: Use TEST_TEMPDIR when set for test files.

This commit is contained in:
Michael Nebel
2024-12-09 13:59:01 +01:00
parent baa248ce65
commit 5624a77176

View File

@@ -12,7 +12,7 @@ namespace SemmleTests.Semmle.Util
/// </summary>
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",