Skip to content

Commit 6ae1f1a

Browse files
committed
Update TestRunner.cs
1 parent 3cccb3c commit 6ae1f1a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

eng/helix/content/RunTests/TestRunner.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,12 @@ public bool SetupEnvironment()
4545

4646
#if INSTALLPLAYWRIGHT
4747
// Playwright will download and look for browsers to this directory
48-
var playwrightBrowsers = Path.Combine(helixDir, "ms-playwright");
48+
var playwrightBrowsers = Environment.GetEnvironmentVariable("PLAYWRIGHT_BROWSERS_PATH");
4949
Console.WriteLine($"Setting PLAYWRIGHT_BROWSERS_PATH: {playwrightBrowsers}");
5050
EnvironmentVariables.Add("PLAYWRIGHT_BROWSERS_PATH", playwrightBrowsers);
51+
var playrightDriver = Environment.GetEnvironmentVariable("PLAYWRIGHT_DRIVER_PATH");
52+
Console.WriteLine($"Setting PLAYWRIGHT_DRIVER_PATH: {playrightDriver}");
53+
EnvironmentVariables.Add("PLAYWRIGHT_DRIVER_PATH", playrightDriver);
5154
#else
5255
Console.WriteLine($"Skipping setting PLAYWRIGHT_BROWSERS_PATH");
5356
#endif
@@ -344,9 +347,7 @@ public void UploadResults()
344347
// Combine the directory name + log name for the copied log file name to avoid overwriting duplicate test names in different test projects
345348
var logName = $"{Path.GetFileName(Path.GetDirectoryName(file))}_{Path.GetFileName(file)}";
346349
Console.WriteLine($"Copying: {file} to {Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, logName)}");
347-
// Need to copy to HELIX_WORKITEM_UPLOAD_ROOT and HELIX_WORKITEM_UPLOAD_ROOT/../ in order for Azure Devops attachments to link properly and for Helix to store the logs
348350
File.Copy(file, Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, logName));
349-
File.Copy(file, Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, "..", logName));
350351
}
351352
}
352353
else
@@ -360,9 +361,7 @@ public void UploadResults()
360361
{
361362
var fileName = Path.GetFileName(file);
362363
Console.WriteLine($"Copying: {file} to {Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, fileName)}");
363-
// Need to copy to HELIX_WORKITEM_UPLOAD_ROOT and HELIX_WORKITEM_UPLOAD_ROOT/../ in order for Azure Devops attachments to link properly and for Helix to store the logs
364364
File.Copy(file, Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, fileName));
365-
File.Copy(file, Path.Combine(HELIX_WORKITEM_UPLOAD_ROOT, "..", fileName));
366365
}
367366
}
368367
else

0 commit comments

Comments
 (0)