Skip to content

Commit

Permalink
Test linking of all 3 types of loggers + running one of them.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilonatommy committed Sep 11, 2024
1 parent 8e4bc94 commit 8c9da17
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/mono/wasm/Wasm.Build.Tests/TestAppScenarios/MemoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,20 @@ public async Task AllocateLargeHeapThenRepeatedlyInterop()
}
}

[Fact]
public async Task RunSimpleAppWithProfiler()
[Theory]
[InlineData("log", true)]
[InlineData("browser", false)]
[InlineData("aot", false)]
public async Task RunSimpleAppWithProfiler(string wasmProfiler, bool testRun)
{
string config = "Release";
CopyTestAsset("WasmBasicTestApp", "ProfilerTest", "App");
string extraArgs = "-p:WasmProfilers=log; -p:WasmBuildNative=true";
string extraArgs = $"-p:WasmProfilers={wasmProfiler}; -p:WasmBuildNative=true";
BuildProject(config, assertAppBundle: false, extraArgs: extraArgs);

if (!testRun)
return;

var result = await RunSdkStyleAppForBuild(new (Configuration: config, TestScenario: "ProfilerTest"));
Regex regex = new Regex(@"Profile data of size (\d+) bytes");
var match = result.TestOutput
Expand Down

0 comments on commit 8c9da17

Please sign in to comment.