Skip to content

Replace RunTests scripts with .NET app #20337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 1, 2020
Merged

Replace RunTests scripts with .NET app #20337

merged 13 commits into from
Apr 1, 2020

Conversation

BrennanConroy
Copy link
Member

Removing all our scripting logic from .cmd and .sh files for running tests on Helix and normalizing it into .NET code.

@BrennanConroy BrennanConroy added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Mar 30, 2020
@BrennanConroy BrennanConroy requested a review from davidfowl March 30, 2020 23:23
environmentVariables: environmentVariables);

await ProcessUtil.RunAsync($"{dotnetRoot}/dotnet",
$"tool install dotnet-ef --global --version {efVersion}",
Copy link
Member

Choose a reason for hiding this comment

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

Global?

Copy link
Member Author

Choose a reason for hiding this comment

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

We set the DOTNET_CLI_HOME environment variable so it isn't "global". But maybe I should move some more of that logic out of the scripts

Copy link
Member

Choose a reason for hiding this comment

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

Yes

$"vstest {target} -lt",
environmentVariables: environmentVariables);

if (discoveryResult.StandardOutput.Contains("Exception thrown"))
Copy link
Member

Choose a reason for hiding this comment

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

Why would this happen?

Copy link
Member

Choose a reason for hiding this comment

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

Is it ever in stderr?

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'm not familiar with the specifics of this
#8107

@BrennanConroy
Copy link
Member Author

Looks like I've got all tests running correctly now. So just need to do cleanup.

@BrennanConroy BrennanConroy marked this pull request as ready for review April 1, 2020 01:48
@BrennanConroy BrennanConroy added this to the 5.0.0-preview4 milestone Apr 1, 2020
@dougbu
Copy link
Contributor

dougbu commented Apr 1, 2020

I was invited to review this but have no context. What are the aims of this PR?

@BrennanConroy
Copy link
Member Author

Just figured you might be interested.

What are the aims of this PR?

Replacing our scripts with .NET code. We know how to write in .NET and it consolidates our logic to one place instead of multiple.

@davidfowl
Copy link
Member

Ship it

@dougbu
Copy link
Contributor

dougbu commented Apr 1, 2020

Just figured you might be interested.

The overall approach is not a big deal to me either way.

I am concerned about requiring that Helix agents build the new RunTests project. That will likely slow down every run enough to matter cumulatively (we do lots 'o runs). Suggest building then including the results in the job payloads.

We know how to write in .NET and it consolidates our logic to one place instead of multiple.

nit: Not sure how valid the first point is given everyone needs to be familiar w/ MSBuild and scripting to do ops-on-call work. But, I agree maintaining bash and cmd scripts in parallel can get frustrating.

Copy link
Member

@HaoK HaoK left a comment

Choose a reason for hiding this comment

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

Nice, this is way better than maintaining cmd and sh versions!

@BrennanConroy BrennanConroy merged commit ca5cd91 into master Apr 1, 2020
@BrennanConroy BrennanConroy deleted the brecon/helixapp branch April 1, 2020 16:01
@dougbu
Copy link
Contributor

dougbu commented Apr 1, 2020

@BrennanConroy unless you've confirmed the time spent on Helix agents hasn't worsened, please file a follow-up issue to move the RunTests.csproj build into the main job.

@BrennanConroy
Copy link
Member Author

It takes a couple seconds to build... this is definitely not an area we need to care about to improve PR/rolling builds...

@HaoK
Copy link
Member

HaoK commented Apr 1, 2020

Well I guess its probably a little cleaner just to build the runtests thing as part of the normal builds, and just include the dll into helix content and run that dll in the scripts, since that would let us write unit tests against RunTests too, which probably is a good thing since its gotten pretty complicated now :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants