Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

[release/3.0] Update tests to explicit set/unset environment variables as they expect #8811

Merged
merged 2 commits into from
Nov 21, 2019

Conversation

elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Nov 8, 2019

Description

The tests were relying on environment variables (DOTNET_ROOT, DOTNET_MULTILEVEL_LOOKUP) being not set or set a certain way in the machine environment rather than explicitly handling unsetting/setting the environment themselves. Due to recent changes in agent configuration, this lack of robustness was exposed and some tests are now consistently failing.

Impact

This will block core-setup CI builds from completing successfully and therefore ingestion of other repo bits.

Risk

Low. This is a port of test-only changes that have been in master for months.

This is a port of 9b9814c and 016c970.

elinor-fung and others added 2 commits November 8, 2019 11:52
If this variable is set in your environment, running `build.sh -t` will
pass it to the test harness, causing these tests to fail.

Teach Command.EnvironmentVariable() to handle `null` as an empty string,
so that if the DotNetRoot() extension method is called with a `null`
parameter, the $DOTNET_ROOT and $DOTNET_ROOT(x86) environment variables
are essentially unset as far as pal::getenv() is concerned.
@elinor-fung elinor-fung added this to the 3.0.x milestone Nov 8, 2019
@elinor-fung
Copy link
Member Author

@wtgodbe this is those same test-only fixes targeting release/3.0 (per #8775 (comment)). Do you know what the status is for the 3.0 branch (is it in some locked down / nothing should go in state right now)?

@wtgodbe
Copy link
Member

wtgodbe commented Nov 8, 2019

The 3.0 branch is still locked down for 3.0.1 - I believe we should be open again by next Thursday.

@elinor-fung elinor-fung modified the milestones: 3.0.x, 3.0.2 Nov 8, 2019
@elinor-fung elinor-fung added tell-mode area-Host test bug Problem in test source code (most likely) labels Nov 11, 2019
@mmitche mmitche merged commit 924d3fe into dotnet:release/3.0 Nov 21, 2019
@elinor-fung elinor-fung deleted the testFixEnv-3.0 branch November 21, 2019 18:22
mmitche pushed a commit that referenced this pull request Nov 25, 2019
* update branding to 3.0.2 (#8864)

* [release/3.0] Update tests to explicit set/unset environment variables as they expect (#8811)

* Explicitly set DOTNET_MULTILEVEL_LOOKUP in tests (#7541)

* Unset $DOTNET_ROOT environment variable for tests that don't require it

If this variable is set in your environment, running `build.sh -t` will
pass it to the test harness, causing these tests to fail.

Teach Command.EnvironmentVariable() to handle `null` as an empty string,
so that if the DotNetRoot() extension method is called with a `null`
parameter, the $DOTNET_ROOT and $DOTNET_ROOT(x86) environment variables
are essentially unset as far as pal::getenv() is concerned.

* HostWriter: Remove signature on MAC host (#8625)

In order to conform with Catalina notarization requirements, the template apphost
will be shipped after codesigning.

This commit implements a change to remove the code-signature when customizing the apphost for an app.

Testing:
- Tested the HostModel library using a locally signed version of apphost
- Verified that unsigned host can be re-signed later
- Verified that the original unsigned-apphost, and the signature-removed-apphost are binary equal.

* Add servicing config: project skip infrastructure (#8827)

* [release/3.0] Update dependencies from dnceng/internal/dotnet-wpf-int (#8866)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int build 20191118.7

- Microsoft.DotNet.Wpf.DncEng - 4.8.0-servicing.19568.7

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int build 20191118.14

- Microsoft.DotNet.Wpf.DncEng - 4.8.0-servicing.19568.14

Dependency coherency updates

- Microsoft.DotNet.Wpf.GitHub - 4.8.0-servicing.19568.4 (parent: Microsoft.DotNet.Wpf.DncEng)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int build 20191120.4

- Microsoft.DotNet.Wpf.DncEng - 4.8.0-servicing.19570.4

Dependency coherency updates

- Microsoft.DotNet.Wpf.GitHub - 4.8.0-servicing.19568.4 (parent: Microsoft.DotNet.Wpf.DncEng)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int build 20191121.4

- Microsoft.DotNet.Wpf.DncEng - 4.8.0-servicing.19571.4

Dependency coherency updates

- Microsoft.DotNet.Wpf.GitHub - 4.8.0-servicing.19571.2 (parent: Microsoft.DotNet.Wpf.DncEng)

* Update dependencies from https://github.com/dotnet/arcade build 20191119.2 (#8872)

- Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19569.2
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19569.2
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19569.2
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19569.2

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int build 20191121.6 (#8884)

- Microsoft.DotNet.Wpf.DncEng - 4.8.0-servicing.19571.6

Dependency coherency updates

- Microsoft.DotNet.Wpf.GitHub - 4.8.0-servicing.19571.3 (parent: Microsoft.DotNet.Wpf.DncEng)

* Update dependencies from https://github.com/dotnet/corefx build 20191121.1 (#8886)

- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-servicing.19571.1

* Update dependencies from https://github.com/dotnet/corefx build 20191121.2 (#8887)

- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-servicing.19571.2

* [release/3.0] Update dependencies from dotnet/coreclr (#8875)

* Update dependencies from https://github.com/dotnet/coreclr build 20191120.2

- Microsoft.NETCore.Runtime.CoreCLR - 3.0.2-servicing.19570.2

* Update dependencies from https://github.com/dotnet/coreclr build 20191120.4

- Microsoft.NETCore.Runtime.CoreCLR - 3.0.2-servicing.19570.4

* Update dependencies from https://github.com/dotnet/coreclr build 20191121.1

- Microsoft.NETCore.Runtime.CoreCLR - 3.0.2-servicing.19571.1

* Update dependencies from https://github.com/dotnet/coreclr build 20191121.4

- Microsoft.NETCore.Runtime.CoreCLR - 3.0.2-servicing.19571.4

* Update dependencies from https://github.com/dotnet/coreclr build 20191121.5

- Microsoft.NETCore.Runtime.CoreCLR - 3.0.2-servicing.19571.5

* Update dependencies from https://github.com/dotnet/corefx build 20191121.3 (#8888)

- System.Drawing.Common - 4.6.2-servicing.19571.3
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-servicing.19571.3
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Host tell-mode test bug Problem in test source code (most likely)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants