-
Notifications
You must be signed in to change notification settings - Fork 441
Enable scenario test execution in VMR build #19222
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
Changes from all commits
6611f11
4790dc9
aa1f65e
81af398
b74d5fb
5599561
28ddf27
1b4412e
f5a97a3
6450dbc
7e91377
4ad4063
7bef2e3
54ca111
2621b96
49c04fc
877fc86
d979155
c56edf5
3de2045
fa6b2e4
41b46b4
09b93d4
8e9b075
7bb0e4a
b7bf1bb
1c9cdd7
9745f7a
069f2a6
1760ffa
ef2a81a
1e5f256
4176797
def2454
f7e0a03
479d957
71a9649
c39accb
0da9a75
003fbc4
c0f5a56
d14add1
cb6d71a
d2d54f5
3575d65
a5b08c2
9b2c707
83b9e46
497ba53
75a5684
2574442
ee9f229
1d24ea4
bf33d8c
54b299a
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,20 @@ | ||
<Project Sdk="Microsoft.Build.NoTargets"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>$(NetCurrent)</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<Target Name="ExtractSdkArchive" | ||
BeforeTargets="AfterBuild" | ||
DependsOnTargets="DetermineSourceBuiltSdkVersion" | ||
Inputs="$(SdkTarballPath)" | ||
Outputs="$(DotNetSdkExtractDir)"> | ||
<MakeDir Directories="$(DotNetSdkExtractDir)" /> | ||
<Exec Condition="'$(ArchiveExtension)' == '.tar.gz'" | ||
Command="tar -xzf $(SdkTarballPath) -C $(DotNetSdkExtractDir)" /> | ||
<Unzip Condition="'$(ArchiveExtension)' == '.zip'" | ||
SourceFiles="$(SdkTarballPath)" | ||
DestinationFolder="$(DotNetSdkExtractDir)" /> | ||
</Target> | ||
|
||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project> | ||
|
||
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets, $(MSBuildThisFileDirectory)..))" /> | ||
|
||
<!-- scenario-tests test execution requires a custom test target. --> | ||
<Target Name="Test" DependsOnTargets="RunScenarioTests" /> | ||
<Target Name="VSTest" DependsOnTargets="RunScenarioTests" /> | ||
|
||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project Sdk="Microsoft.Build.NoTargets"> | ||
|
||
<PropertyGroup> | ||
mthalman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<TargetFramework>$(NetCurrent)</TargetFramework> | ||
<IsTestProject>true</IsTestProject> | ||
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. Just for my own understanding, why did you need to add this property? |
||
</PropertyGroup> | ||
|
||
<!-- Scenarios tests are handled separately from the other test projects. This is because the output of the scenario tests is | ||
an executable that is used to run the tests and so using the VSTest runner doesn't work with them. They also require | ||
some setup steps to be configured with the VMR. --> | ||
<Target Name="RunScenarioTests"> | ||
<MSBuild Projects="$(RepoProjectsDir)scenario-tests.proj" | ||
Properties="Configuration=$(Configuration)" | ||
Targets="RunScenarioTests" /> | ||
</Target> | ||
|
||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,29 @@ | ||
<Project Sdk="Microsoft.Build.Traversal"> | ||
|
||
<PropertyGroup> | ||
<_RunScenarioTests>true</_RunScenarioTests> | ||
|
||
<!-- Skip scenario tests if the host architecture is different from the target architecture since the tests | ||
require the ability to execute the built SDK. But the CLI is not capable of running on a host with a | ||
different architecture (i.e. "cannot execute binary file: Exec format error"). --> | ||
<_RunScenarioTests Condition="'$(BuildArchitecture.ToLowerInvariant())' != '$(TargetArchitecture.ToLowerInvariant())'">false</_RunScenarioTests> | ||
|
||
<!-- Skip scenario tests if the portable OS (determined from the host machine) is different from the target OS | ||
since the tests require the ability to execute the built SDK. An example of where this would be disabled is | ||
cross-build of using Mariner to build for Alpine (linux vs linux-musl). --> | ||
<_RunScenarioTests Condition="'$(BuildOS)' != 'windows' and '$(__PortableTargetOS.ToLowerInvariant())' != '$(TargetOS.ToLowerInvariant())'">false</_RunScenarioTests> | ||
|
||
<!-- The scenario tests are not supported when unofficial build versioning is used. --> | ||
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. Please file a tracking issue for that and link to it here. 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. |
||
<_RunScenarioTests Condition="'$(UseOfficialBuildVersioning)' == 'false'">false</_RunScenarioTests> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(RepositoryEngineeringDir)extract-sdk-archive.proj" /> | ||
<ProjectReference Include="Microsoft.DotNet.SourceBuild.SmokeTests\Microsoft.DotNet.SourceBuild.SmokeTests.csproj" | ||
Condition="'$(DotNetBuildSourceOnly)' == 'true'" /> | ||
<ProjectReference Include="Microsoft.DotNet.UnifiedBuild.Tests\Microsoft.DotNet.UnifiedBuild.Tests.csproj" | ||
Condition="'$(ShortStack)' != 'true' and '$(PortableBuild)' == 'true' and '$(PgoInstrument)' != 'true'" /> | ||
<ProjectReference Include="scenario-tests\scenario-tests.proj" Condition="'$(_RunScenarioTests)' == 'true'" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Matt Thalman <mthalman@microsoft.com> | ||
Date: Tue, 30 Apr 2024 08:34:08 -0500 | ||
Subject: [PATCH] Disable Aspire scenario test | ||
|
||
Backport: https://github.com/dotnet/sdk/pull/40485 | ||
--- | ||
.../SdkTemplateTests.cs | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs b/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs | ||
index c43fdd6..bb5c52d 100644 | ||
--- a/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs | ||
+++ b/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs | ||
@@ -217,7 +217,7 @@ public class SdkTemplateTests : IClassFixture<ScenarioTestFixture> | ||
newTest.Execute(_sdkHelper, _scenarioTestInput.TestRoot, "wasm-tools"); | ||
} | ||
|
||
- [Fact] | ||
+ //[Fact] | ||
[Trait("Category", "Workload")] | ||
[Trait("Category", "InProgress")] | ||
public void VerifyAspireTemplate() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Matt Thalman <mthalman@microsoft.com> | ||
Date: Tue, 30 Apr 2024 10:21:32 -0500 | ||
Subject: [PATCH] Disable WPF scenario test | ||
|
||
Backport: https://github.com/dotnet/source-build/issues/4361 | ||
--- | ||
.../SdkTemplateTests.cs | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs b/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs | ||
index c43fdd6..35279a9 100644 | ||
--- a/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs | ||
+++ b/src/Microsoft.DotNet.ScenarioTests.SdkTemplateTests/SdkTemplateTests.cs | ||
@@ -84,7 +84,7 @@ public class SdkTemplateTests : IClassFixture<ScenarioTestFixture> | ||
newTest.Execute(_sdkHelper, _scenarioTestInput.TestRoot); | ||
} | ||
|
||
- [Theory] | ||
+ //[Theory] | ||
[InlineData(DotNetLanguage.CSharp)] | ||
[InlineData(DotNetLanguage.VB)] | ||
[Trait("Category", "Offline")] |
Uh oh!
There was an error while loading. Please reload this page.