Skip to content

Commit 20c3e46

Browse files
committed
Tactical
1 parent 7a021f4 commit 20c3e46

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectory.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,18 @@ public static ProjectDirectory Create(string projectName, string baseDirectory =
3333
throw new InvalidOperationException("RepoRoot was not specified.");
3434
}
3535

36-
var testAppsRoot = Path.Combine(RepoRoot, "src", "Components", "Blazor", "Build", "testassets");
36+
var testAppsRoot = Path.Combine(Directory.GetCurrentDirectory(), "testassets");
37+
if (!Directory.Exists(testAppsRoot))
38+
{
39+
testAppsRoot = Path.Combine(RepoRoot, "src", "Components", "Blazor", "Build", "testassets");
40+
}
41+
42+
if (!Directory.Exists(testAppsRoot))
43+
{
44+
throw new DirectoryNotFoundException("Unable to find testassets in " +
45+
$"{Path.Combine(Directory.GetCurrentDirectory(), "testassets")} or {testAppsRoot}.");
46+
}
47+
3748
foreach (var project in new string[] { projectName, }.Concat(additionalProjects ?? Array.Empty<string>()))
3849
{
3950
var projectRoot = Path.Combine(testAppsRoot, project);

src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
<Compile Include="$(SharedSourceRoot)CommandLineUtils\**\*.cs" />
4242
</ItemGroup>
4343

44+
<ItemGroup>
45+
<HelixContent Include="..\testassets\**\*" />
46+
</ItemGroup>
47+
4448
<ItemGroup>
4549
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
4650
<_Parameter1>Testing.RepoRoot</_Parameter1>

0 commit comments

Comments
 (0)