Skip to content

Remove steps from test jobs#49452

Merged
RikkiGibson merged 43 commits intodotnet:masterfrom
RikkiGibson:remove-steps-from-test-jobs
Nov 24, 2020
Merged

Remove steps from test jobs#49452
RikkiGibson merged 43 commits intodotnet:masterfrom
RikkiGibson:remove-steps-from-test-jobs

Conversation

@RikkiGibson
Copy link
Member

@RikkiGibson RikkiGibson commented Nov 17, 2020

Fixes #46930
Follow up to #49163 and #49153

This is another step on our journey to running on Helix. We remove the restore and checkout steps from our unit test jobs, and we onboard coreclr test runs to the RunTests console app.

@RikkiGibson RikkiGibson marked this pull request as ready for review November 19, 2020 00:48
@RikkiGibson RikkiGibson requested a review from a team as a code owner November 19, 2020 00:48
<SystemIOFileSystemPrimitivesVersion>4.3.0</SystemIOFileSystemPrimitivesVersion>
<SystemIOPipesAccessControlVersion>4.5.1</SystemIOPipesAccessControlVersion>
<SystemIOPipelinesVersion>4.7.0</SystemIOPipelinesVersion>
<SystemManagementVersion>5.0.0-preview.8.20407.11</SystemManagementVersion>
Copy link
Member

Choose a reason for hiding this comment

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

The version here is repeated and essentially lines up to the .NET SDK version we are using. Consider factoring this out to a property just as we do for our VS references. That will make future updates easier and more consistent.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should MicrosoftCodeAnalysisNetAnalyzersVersion be repurposed to do this?

<MicrosoftCodeAnalysisNetAnalyzersVersion>5.0.0-rc2.20453.1</MicrosoftCodeAnalysisNetAnalyzersVersion>

Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep those separate. There have been times in the past where we have rev'd analyzers and SDK references at different times. Or another way to think about it is that we should expect drift between components that come from different GitHub repositories even if they all ship in the .NET SDK.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, I think we should look at doing this in a subsequent PR.

queue: ${{ parameters.queueName }}
timeoutInMinutes: 120
steps:
- checkout: none
Copy link
Member

Choose a reason for hiding this comment

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

image

"src/Workspaces/MSBuildTest/Resources/Directory.Build.targets",
"src/Workspaces/MSBuildTest/Resources/Directory.Build.rsp",
"src/Workspaces/MSBuildTest/Resources/NuGet.Config",
};
Copy link
Member

Choose a reason for hiding this comment

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

Why did you keep them here vs. putting them under the eng directory?

Copy link
Member Author

Choose a reason for hiding this comment

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

Unit tests within src/Workspaces/MSBuildTest depend on being able to embed these resources. Moving them seemed to introduce more pain than just leaving them here and including them in the test payload to make eng/build.ps1 happy.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, thought I had mostly fixed up the Unit Tests problems in the Clone2 PR. Must have missed a few. Can clean this up later though.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am hoping that with @jasonmalinowski's guidance, it will be fairly straightforward to fix #49486 and remove this concern from eng/build.ps1 entirely.

RikkiGibson and others added 2 commits November 23, 2020 11:11
Co-authored-by: Jared Parsons <jaredpparsons@gmail.com>
@RikkiGibson
Copy link
Member Author

Ping @dotnet/roslyn-infrastructure for review

@RikkiGibson RikkiGibson merged commit e192dc2 into dotnet:master Nov 24, 2020
@ghost ghost added this to the Next milestone Nov 24, 2020
@RikkiGibson RikkiGibson deleted the remove-steps-from-test-jobs branch November 24, 2020 17:23
fi
dotnet exec "$scriptroot/../artifacts/bin/RunTests/${configuration}/netcoreapp3.1/RunTests.dll" --tfm netcoreapp3.1 --tfm net5.0 --configuration ${configuration} --dotnet ${_InitializeDotNetCli}/dotnet $runtests_args
fi
ExitWithExitCode 0
Copy link
Member

@alrz alrz Nov 24, 2020

Choose a reason for hiding this comment

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

Have you guys considered rewriting the build script using C# (possibly something like this). With top-level statements that would look the same too!

I think at this point it would make sense to push C# as the language of choice for this sort of things.

Copy link
Member

Choose a reason for hiding this comment

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

Making it easier to deploy tooling like this is definitely on my radar. My personal goal is that we can get to a point in .NET 6 where we can dotnet run some_file.cs. Essentially have the dotnet run infrastructure generate project files in the background, compile them and then execute the resulting binary. At that point we can essentially have single C# file programs that we can run across all the OS that we support. That should make scenarios like this a lot easier to handle.

Copy link
Member Author

Choose a reason for hiding this comment

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

If I never write another line of bash in my life, it will be too soon

...I say, before moving on to a task that will very likely involve writing bash

Copy link
Member

Choose a reason for hiding this comment

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

dotnet run some_file.cs

You will probably need to add some [nuget] references along the way. Personally I wouldn't mind having a minimal project file (which already has full tooling support), then build.sh would reduce to this.

333fred added a commit to 333fred/roslyn that referenced this pull request Nov 30, 2020
* upstream/master: (265 commits)
  Use extra generic type parameters and apply C#-specific knowledge to all langs instead of using inheritance
  Cover all changed code paths
  Stop removing parens that are required by C#
  Fix unnecessary spans
  Failing test for preserving parens around conditional expression
  AddSynthesizedRecordMembersIfNecessary - avoid touching members that are known to have no effect on the outcome of the function. (dotnet#49610)
  Resolve follow-up comments in PR "Create default arguments during binding" (dotnet#49588)
  Remove restore and checkout from test jobs (dotnet#49452)
  3.8.* -> 3.9.*
  Update PublishData.json
  Update Versions.props
  Remove Microsoft.CodeAnalysis.VisualBasic.dll from the VSPE.OptProfTests.DDRIT_RPS_ManagedLangs_Typing runs
  Fix the ability to expand the list of analyzers in a reference
  Fix comment
  Address feedback to ensure `/warnaserror-:ID` prevents config options from bumping a warning to an error.
  parallel restore on mac/linux (dotnet#49523)
  VSMac: Make QuickFix preview resizable and add title (dotnet#49394)
  Add CallerMemberNameAttributeWithImplicitObjectCreation test (dotnet#49556)
  Update dependencies from https://github.com/dotnet/arcade build 20201120.10 (dotnet#49541)
  Clarify comment
  ...
@dibarbet dibarbet modified the milestones: Next, 16.9.P3 Dec 19, 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.

Coreclr tests should use RunTests.exe

6 participants