From e6a3a1a2299f0857417dc1f5b5a9c89b8b4ef0d8 Mon Sep 17 00:00:00 2001 From: Vagisha Nidhi Date: Thu, 8 Aug 2019 18:14:29 +0530 Subject: [PATCH 1/3] Specify env variable in runsettings RFC --- ...fy-Environment-Variables-In-Runsettings.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 RFCs/0027-Specify-Environment-Variables-In-Runsettings.md diff --git a/RFCs/0027-Specify-Environment-Variables-In-Runsettings.md b/RFCs/0027-Specify-Environment-Variables-In-Runsettings.md new file mode 100644 index 00000000..7de0061f --- /dev/null +++ b/RFCs/0027-Specify-Environment-Variables-In-Runsettings.md @@ -0,0 +1,32 @@ +# 0027 Specifying Environment Variables In RunSettings File + +## Summary +Specifying environment variables in the runsettings file. The environment variables can be set which can directly interact with the test host. + +## Motivation +Specifying environment variables in the runsettings file is necessary to support non-trivial projects that require settings env vars like DOTNET_ROOT. These variables are set while spawning the test host process, thus will be available in the host. + +## Usage +The runsettings contains a "EnvironmentVariables" node in the RunConfiguration section. +The different environment variables can be specified as element name and it's value. +Below is a sample runsettings for passing environment variables. + +```csharp + + + + + + + + C:\ProgramFiles\dotnet + C:\Codebase\Sdk + + + + + +``` +Since these environment variables should always be set when the test host is started, the tests should always run in a separate process. +For this, the `/InIsolation` flag will be set when there are environment variables so that the test host is always invoked. + From c4e793fdf71bf8497eb37e6fea4d83cfa23985d0 Mon Sep 17 00:00:00 2001 From: Vagisha Nidhi Date: Thu, 8 Aug 2019 18:15:48 +0530 Subject: [PATCH 2/3] Update 0027-Specify-Environment-Variables-In-Runsettings.md --- RFCs/0027-Specify-Environment-Variables-In-Runsettings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFCs/0027-Specify-Environment-Variables-In-Runsettings.md b/RFCs/0027-Specify-Environment-Variables-In-Runsettings.md index 7de0061f..8c4b3280 100644 --- a/RFCs/0027-Specify-Environment-Variables-In-Runsettings.md +++ b/RFCs/0027-Specify-Environment-Variables-In-Runsettings.md @@ -18,7 +18,7 @@ Below is a sample runsettings for passing environment variables. - + C:\ProgramFiles\dotnet C:\Codebase\Sdk From 2f3931e0e3f7325db64d524a51d8eb706a18aad5 Mon Sep 17 00:00:00 2001 From: Vagisha Nidhi Date: Thu, 8 Aug 2019 18:16:13 +0530 Subject: [PATCH 3/3] Update 0027-Specify-Environment-Variables-In-Runsettings.md --- RFCs/0027-Specify-Environment-Variables-In-Runsettings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFCs/0027-Specify-Environment-Variables-In-Runsettings.md b/RFCs/0027-Specify-Environment-Variables-In-Runsettings.md index 8c4b3280..2320e568 100644 --- a/RFCs/0027-Specify-Environment-Variables-In-Runsettings.md +++ b/RFCs/0027-Specify-Environment-Variables-In-Runsettings.md @@ -18,7 +18,7 @@ Below is a sample runsettings for passing environment variables. - + C:\ProgramFiles\dotnet C:\Codebase\Sdk