-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add a "Helix Test" step to the official build definitions #15177
Changes from all commits
9c9e299
5500f10
80e2586
dc1eafa
baf7e54
10b08fa
ca4a129
64b73d9
febe1f6
5aaca65
b9bcea1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<Target Name="CloudBuild" Condition="'$(EnableCloudTest)' != 'true'" /> | ||
|
||
<!-- | ||
enables cloud-distributed testing. please see target VerifyInputs | ||
in CloudTest.targets for the complete list of required properties. | ||
--> | ||
<Import Project="$(MSBuildThisFileDirectory)CloudTest.targets" Condition="'$(EnableCloudTest)' == 'true'" /> | ||
|
||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,9 +28,15 @@ | |
|
||
<PropertyGroup> | ||
<XunitRuntimeConfig>$(ToolsDir)\xunit.console.netcore.runtimeconfig.json</XunitRuntimeConfig> | ||
<TestHostExecutablePath Condition="'$(OS)'=='Windows_NT' AND '$(TestHostExecutablePath)' == ''">$(TestSharedFxDir)\dotnet.exe</TestHostExecutablePath> | ||
<TestHostExecutablePath Condition="'$(OS)'!='Windows_NT' AND '$(TestHostExecutablePath)' == ''">$(TestSharedFxDir)\dotnet</TestHostExecutablePath> | ||
<XunitExecutable Condition="'$(XunitExecutable)' == ''">$(TestPath)\xunit.console.netcore.exe</XunitExecutable> | ||
<TestRuntimeEnvVar Condition="'$(OS)' == 'Windows_NT'">%RUNTIME_PATH%\</TestRuntimeEnvVar> | ||
<TestRuntimeEnvVar Condition="'$(OS)' != 'Windows_NT'">$RUNTIME_PATH/</TestRuntimeEnvVar> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did we call this runtimepath? It is a little miss-leading as we do have a RuntimePath which isn't this directory. This is really the testdotnetcli directory. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It used to be, but isn't anymore. I tried to clean things up when we moved over to dotnet.exe, but the name of this variable wasn't updated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please file an issue to clean this up? |
||
<TestHostExecutablePath Condition="'$(OS)'=='Windows_NT' AND '$(TestHostExecutablePath)' == ''">$(TestRuntimeEnvVar)dotnet.exe</TestHostExecutablePath> | ||
<TestHostExecutablePath Condition="'$(OS)'!='Windows_NT' AND '$(TestHostExecutablePath)' == ''">$(TestRuntimeEnvVar)dotnet</TestHostExecutablePath> | ||
|
||
<ExecutionDirEnvVar Condition="'$(OS)' == 'Windows_NT'">%EXECUTION_DIR%\</ExecutionDirEnvVar> | ||
<ExecutionDirEnvVar Condition="'$(OS)' != 'Windows_NT'">$EXECUTION_DIR/</ExecutionDirEnvVar> | ||
<XunitExecutable Condition="'$(XunitExecutable)' == ''">$(ExecutionDirEnvVar)xunit.console.netcore.exe</XunitExecutable> | ||
|
||
<DebugEngines>{2E36F1D4-B23C-435D-AB41-18E608940038}</DebugEngines> | ||
</PropertyGroup> | ||
|
||
|
@@ -188,7 +194,7 @@ | |
|
||
<MakeDir Condition="'$(CoverageEnabledForProject)'=='true'" Directories="$(CoverageReportDir)" /> | ||
|
||
<Exec Command="$(TestPath)/$(RunnerScriptName) $(RuntimePath)" | ||
<Exec Command="$(TestPath)/$(RunnerScriptName) $(TestSharedFxDir)" | ||
CustomErrorRegularExpression="Failed: [^0]" | ||
ContinueOnError="true" | ||
IgnoreStandardErrorWarningFormat="true" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,7 +209,25 @@ | |
}, | ||
"inputs": { | ||
"filename": "docker", | ||
"arguments": "exec $(PB_DockerContainerName) $(PB_GitDirectory)/build-tests.sh -buildArch=$(PB_Platform) -$(PB_ConfigurationGroup) -SkipTests", | ||
"arguments": "exec $(PB_DockerContainerName) $(PB_GitDirectory)/build-tests.sh -buildArch=$(PB_Platform) -$(PB_ConfigurationGroup) -SkipTests -- /p:ArchiveTests=true", | ||
"workingFolder": "", | ||
"failOnStandardError": "false" | ||
} | ||
}, | ||
{ | ||
"enabled": true, | ||
"continueOnError": false, | ||
"alwaysRun": false, | ||
"displayName": "Create Helix Test Jobs", | ||
"timeoutInMinutes": 0, | ||
"task": { | ||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", | ||
"versionSpec": "1.*", | ||
"definitionType": "task" | ||
}, | ||
"inputs": { | ||
"filename": "docker", | ||
"arguments": "exec $(PB_DockerContainerName) $(PB_GitDirectory)/Tools/msbuild.sh $(PB_GitDirectory)/src/tests.builds /t:CloudBuild /p:ArchGroup=$(PB_Platform) /p:ConfigurationGroup=$(PB_ConfigurationGroup) /p:\"EnableCloudTest=$(PB_EnableCloudTest)\" /p:\"BuildMoniker=$(PB_BuildMoniker)\" /p:\"TargetQueue=$(PB_TargetQueue)\" /p:\"TestProduct=$(PB_TestProduct)\" /p:\"Branch=$(SourceBranch)\" /p:\"CloudDropAccountName=$(PB_CloudDropAccountName)\" /p:\"CloudResultsAccountName=$(PB_CloudResultsAccountName)\" /p:\"CloudDropAccessToken=$(CloudDropAccessToken)\" /p:\"CloudResultsAccessToken=$(OutputCloudResultsAccessToken)\" /p:\"TimeoutInSeconds=1200\" /p:\"TargetOS=Linux\" /p:FilterToOSGroup=Linux /p:\"HelixApiAccessKey=$(HelixApiAccessKey)\" /p:HelixApiEndpoint=$(PB_HelixApiEndPoint)", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a requirement, or blocker for your work. Something we might want to consider is abstracting these command-lines even further out of the build definitions. ie, if this line just became...
Then, then entire task can be completely customized just by passing a |
||
"workingFolder": "", | ||
"failOnStandardError": "false" | ||
} | ||
|
@@ -441,6 +459,10 @@ | |
}, | ||
"PB_AdditionalArguments": { | ||
"value": "" | ||
}, | ||
"PB_EnableCloudTest": { | ||
"value": "true", | ||
"allowOverride": true | ||
} | ||
}, | ||
"demands": [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably be using TargetOS here instead of OS. I actually I would like us to capture this condition in one common place in this file instead of duplicating everywhere. Doing it based on OS will not enable us to do a cross-test build on Windows to run on a unix machine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed issue https://github.com/dotnet/corefx/issues/15305 to clean up these usages of OS property.