diff --git a/src/mono/wasm/Wasm.Build.Tests/TestAppScenarios/MemoryTests.cs b/src/mono/wasm/Wasm.Build.Tests/TestAppScenarios/MemoryTests.cs index 4f51f00f54484..ee1ff15f33d0e 100644 --- a/src/mono/wasm/Wasm.Build.Tests/TestAppScenarios/MemoryTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/TestAppScenarios/MemoryTests.cs @@ -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