Skip to content

make.ps1: Run-IntegrationTests(): set working directory for test suite#39698

Merged
kolyshkin merged 1 commit intomoby:masterfrom
thaJeztah:fix_windows_integration_pwd
Aug 8, 2019
Merged

make.ps1: Run-IntegrationTests(): set working directory for test suite#39698
kolyshkin merged 1 commit intomoby:masterfrom
thaJeztah:fix_windows_integration_pwd

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

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.

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 <github@gone.nl>
@thaJeztah
Copy link
Copy Markdown
Member Author

@StefanScherer @olljanat @ddebroy PTAL

Copy link
Copy Markdown
Contributor

@StefanScherer StefanScherer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
Copy link
Copy Markdown
Member Author

Experimental failing on https://jenkins.dockerproject.org/job/Docker-PRs-experimental/46406/console

12:10:40 FAIL: docker_api_swarm_test.go:374: DockerSwarmSuite.TestAPISwarmRaftQuorum

PowerPC failing on https://jenkins.dockerproject.org/job/Docker-PRs-powerpc/15305/console

12:52:14 FAIL: docker_cli_swarm_test.go:1133: DockerSwarmSuite.TestSwarmLockUnlockCluster

@thaJeztah
Copy link
Copy Markdown
Member Author

And Janky on the new Jenkins is failing on https://ci.docker.com/public/job/moby/job/PR-39698/1/display/redirect

[2019-08-08T12:39:19.669Z] ----------------------------------------------------------------------
[2019-08-08T12:39:19.669Z] FAIL: docker_cli_swarm_test.go:1563: DockerSwarmSuite.TestSwarmPublishDuplicatePorts
[2019-08-08T12:39:19.669Z] 
[2019-08-08T12:39:19.669Z] Creating a new daemon
[2019-08-08T12:39:19.669Z] [d587f2c94e1b6] waiting for daemon to start
[2019-08-08T12:39:19.669Z] [d587f2c94e1b6] waiting for daemon to start
[2019-08-08T12:39:19.669Z] [d587f2c94e1b6] daemon started
[2019-08-08T12:39:19.669Z] 
[2019-08-08T12:39:19.669Z] docker_cli_swarm_test.go:1571:
[2019-08-08T12:39:19.669Z]     // make sure task has been deployed.
[2019-08-08T12:39:19.669Z]     waitAndAssert(c, defaultReconciliationTimeout, d.CheckActiveContainerCount, checker.Equals, 1)
[2019-08-08T12:39:19.669Z] docker_utils_test.go:435:
[2019-08-08T12:39:19.669Z]     c.Assert(v, checker, args...)
[2019-08-08T12:39:19.669Z] ... obtained int = 0
[2019-08-08T12:39:19.669Z] ... expected int = 1
[2019-08-08T12:39:19.669Z] 
[2019-08-08T12:39:19.669Z] waited for 30.078307478s (out of 30s)
[2019-08-08T12:39:19.669Z] [d587f2c94e1b6] Stopping daemon
[2019-08-08T12:39:19.669Z] [d587f2c94e1b6] exiting daemon
[2019-08-08T12:39:19.669Z] [d587f2c94e1b6] Daemon stopped

@thaJeztah
Copy link
Copy Markdown
Member Author

I'm not gonna restart those; this PR only affects Windows

@olljanat
Copy link
Copy Markdown
Contributor

olljanat commented Aug 8, 2019

LGTM

Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kolyshkin kolyshkin merged commit 838843b into moby:master Aug 8, 2019
@thaJeztah thaJeztah deleted the fix_windows_integration_pwd branch August 8, 2019 19:10
@thaJeztah thaJeztah added this to the 20.03.0 milestone Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants