Skip to content

Conversation

@dougbu
Copy link
Contributor

@dougbu dougbu commented May 7, 2021

  • restore $(TestDependsOnAspNetRuntime) settings
    • needed to execute on just-built Microsoft.AspNetCore.App.Runtime
  • separate from $(TestDependsOnAspNetPackages) because App.UnitTests need only the packages

@dougbu dougbu requested review from a team and HaoK May 7, 2021 23:22
@dougbu
Copy link
Contributor Author

dougbu commented May 7, 2021

Looks like we're still testing against Microsoft.AspNetCore.App.Runtime bits from the SDK ☹️

@HaoK
Copy link
Member

HaoK commented May 9, 2021

This seems to break all the template tests?

- `restore $(TestDependsOnAspNetRuntime)` settings
  - needed to execute on just-built Microsoft.AspNetCore.App.Runtime
- separate from `$(TestDependsOnAspNetPackages)` because App.UnitTests need only the packages

nit: use `bool` form in `Conditions` using above properties
@dougbu dougbu force-pushed the dougbu/test.on.latest branch from cd3e4c7 to 820cd40 Compare May 9, 2021 05:00
@dougbu
Copy link
Contributor Author

dougbu commented May 9, 2021

This seems to break all the template tests?

Thanks @HaoK. I had ignored $(TestDependsOnAspNetPackages) default in Helix.props.

@dougbu dougbu requested review from a team, BrennanConroy and halter73 as code owners May 9, 2021 05:28
@HaoK
Copy link
Member

HaoK commented May 9, 2021

Just so I understand the intent/distinction here, so we have a set of tests that we don't want to install the aspnet packages? What exactly does TestDependsOnAspNetRuntime affect vs the default false/false case for most tests.

@dougbu
Copy link
Contributor Author

dougbu commented May 9, 2021

@HaoK the interop and template tests build and execute test asset projects using the shared framework.

$(TestDependsOnAspNetRuntime) controls the Directory.Build.* files placed in the work item root. By default, they just block builds checking containing folders. When true, the files are generated (they land in artifacts/bin/GenerateFiles/) and do things like update the @(KnownFrameworkReference) item for Microsoft.AspNetCore.App.

Put another way, test builds normally use the shared Fx carried in the SDK. When $(TestDependsOnAspNetRuntime) is true, test builds instead use the just-built shared Fx from dotnet/aspnetcore.

@HaoK
Copy link
Member

HaoK commented May 9, 2021

Awesome thanks @dougbu that clarifies things for me, I wasn't sure what this switch did, now it makes sense :)

@HaoK
Copy link
Member

HaoK commented May 9, 2021

Side note, maybe we could rename TestDependsOnAspNetRuntime to convey this better, TestDependsOnBuildAspNetRuntime ?

@dougbu
Copy link
Contributor Author

dougbu commented May 9, 2021

maybe we could rename TestDependsOnAspNetRuntime to convey this better, TestDependsOnBuildAspNetRuntime ?

I'm not sure how that improves things and like the existing name. Perhaps $(TestBuildsDependOnAspNetRuntime) might be more accurate but not by much. Either way, I'm leaving any rename of this old property for the future.

@dougbu dougbu merged commit 07c6a62 into main May 9, 2021
@dougbu dougbu deleted the dougbu/test.on.latest branch May 9, 2021 22:14
@ghost ghost added this to the 6.0-preview5 milestone May 9, 2021
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.

3 participants