From 791aa3c33864420725ffa1f6864668d01c53335c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 8 Aug 2019 13:18:50 +0200 Subject: [PATCH] make.ps1: Run-IntegrationTests(): set working directory for test suite This function changed to the correct working directory before starting the tests (which is the same as on Linux), however the `ProcessStartInfo` process does not inherit this working directory, which caused Windows tests to be running with a different working directory as Linux (causing files used in tests to not be found). From the documentation; https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.processstartinfo.workingdirectory?view=netframework-4.8 > When `UseShellExecute` is `true`, the fully qualified name of the directory that contains > the process to be started. When the `UseShellExecute` property is `false`, the working > directory for the process to be started. The default is an empty string (`""`). This patch sets the `ProcessStartInfo.WorkingDirectory` to the correct working directory before starting the process. Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 6ae46aeabf056180067dd6af8d5d8588d6075c31) Signed-off-by: Sebastiaan van Stijn --- hack/make.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/hack/make.ps1 b/hack/make.ps1 index 3c51716ed3..bde0679c60 100644 --- a/hack/make.ps1 +++ b/hack/make.ps1 @@ -343,6 +343,7 @@ Function Run-IntegrationTests() { Write-Host "Running $($PWD.Path)" $pinfo = New-Object System.Diagnostics.ProcessStartInfo $pinfo.FileName = "$($PWD.Path)\test.exe" + $pinfo.WorkingDirectory = "$($PWD.Path)" $pinfo.RedirectStandardError = $true $pinfo.UseShellExecute = $false $pinfo.Arguments = $env:INTEGRATION_TESTFLAGS