Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e6abde0
Reapply "[Mobile] Add BrowserStack Android MAUI Test (#23383)" (#23474)
carzh Jan 28, 2025
0dd42e9
maui csproj that builds into apk successfully
carzh Jan 29, 2025
4011a10
attempt to fix nuget pipeline failure
carzh Jan 29, 2025
0783bb1
target only ort for building c# bindings
carzh Jan 30, 2025
5a5fe4b
removed test projects from sln and updated pipeline yml
carzh Jan 31, 2025
70e3a23
format
carzh Jan 31, 2025
773cbb6
Revert "format"
carzh Jan 31, 2025
657c60d
format again..
carzh Jan 31, 2025
7a51dd5
fixed format again
carzh Jan 31, 2025
ec57836
Merge remote-tracking branch 'msft/main' into carzh/browserstack-andr…
carzh Jan 31, 2025
573e284
removed modifications from sln and commented out the ios and maccatyl…
carzh Feb 3, 2025
15d86f5
added more detailed comment
carzh Feb 4, 2025
2c17720
added test_android yml + added it to nuget pipeline
carzh Feb 4, 2025
fba5416
fixed indent
carzh Feb 4, 2025
a6c9823
Merge remote-tracking branch 'msft/main' into carzh/nuget-test-androi…
carzh Feb 6, 2025
1815b96
fixed curly bracket / ascii processing issue
carzh Feb 7, 2025
e6cd1e8
disable aot compilation for inference sample to see if that resolves …
carzh Feb 7, 2025
d15c053
Merge remote-tracking branch 'msft/main' into carzh/nuget-test-androi…
carzh Feb 21, 2025
a77f4f1
added updated asserts
carzh Feb 21, 2025
7e69c93
made InferenceTest diffs more clear hopefully + removed double feedba…
carzh Feb 22, 2025
24f5b3f
applied formatting suggestions + added second assert method that will…
carzh Feb 25, 2025
90411e9
updated the assertion check for the expected exception message. Added…
carzh Feb 25, 2025
f2e7854
added comment about ep checks, fixed typos, removed aotcompilation
carzh Mar 10, 2025
af28ea3
removed references to the preprocessor directives in the feedback mes…
carzh Mar 10, 2025
a5c7182
added coreml test back in and updated feedback message
carzh Mar 14, 2025
d222d90
updated comment explaining appending ep tests to session options
carzh Mar 19, 2025
26b965e
amended comment
carzh Mar 19, 2025
c70ac90
amended comment
carzh Mar 19, 2025
e7afd4b
Update csharp/test/Microsoft.ML.OnnxRuntime.Tests.Common/InferenceTes…
carzh Mar 20, 2025
1dbd060
Merge remote-tracking branch 'msft/main' into carzh/nuget-test-androi…
carzh Mar 21, 2025
644d01c
resolve '
carzh Mar 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
<DefaultLanguage>en</DefaultLanguage>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-android|AnyCPU'">
Comment thread
carzh marked this conversation as resolved.
Outdated
<RunAOTCompilation>False</RunAOTCompilation>
</PropertyGroup>

<ItemGroup>
<!-- NOTE:
You need to manually put builds from other platforms such as Android in the correct place for this to work for cross-platform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

<Compile Include="..\Microsoft.ML.OnnxRuntime.Tests.Common\InferenceTest.cs" />
<Compile Include="..\Microsoft.ML.OnnxRuntime.Tests.Common\EqualityComparers.cs" />
<Compile Include="..\Microsoft.ML.OnnxRuntime.Tests.Common\AssertUtils.cs" />
<Compile Include="..\Microsoft.ML.OnnxRuntime.Tests.Common\OnnxMl.cs" />
<Compile Include="..\Microsoft.ML.OnnxRuntime.Tests.Common\OnnxData.cs" />
<Compile Include="..\Microsoft.ML.OnnxRuntime.Tests.NetCoreApp\InferenceTest.netcore.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public void Dispose()
{
String failureMessage = TestContext.CurrentContext.Result.Message;
String jsonToSendFailure =
String.Format("browserstack_executor: {\"action\": \"setSessionStatus\", \"arguments\": " +
"{\"status\":\"failed\", \"reason\": {0}}}",
String.Format("browserstack_executor: {{\"action\": \"setSessionStatus\", \"arguments\": " +
"{{\"status\":\"failed\", \"reason\": {0}}}}}",
JsonConvert.ToString(failureMessage));

((IJavaScriptExecutor)driver).ExecuteScript(jsonToSendFailure);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public async Task ClickRunAllTest()
await Task.Delay(500);
}

var (numPassed, numFailed) = GetPassFailCount();
(int numPassed, int numFailed) = GetPassFailCount();

if (numFailed == 0)
{
Expand Down
34 changes: 34 additions & 0 deletions csharp/test/Microsoft.ML.OnnxRuntime.Tests.Common/AssertUtils.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;

namespace Microsoft.ML.OnnxRuntime.Tests
{
internal static class AssertUtils
{

public static void IfThrowsCheckException<T>(Action action, string feedbackMessage, string expectedExceptionMessage = null) where T : Exception
{
try
{
action();
}
catch (T ex)
{
if (expectedExceptionMessage == null)
{
return;
}
else
{
Assert.Contains(expectedExceptionMessage, ex.Message);
}
}
catch (Exception ex)
{
Assert.Fail($"{feedbackMessage}\nExpected {typeof(T).Name} but got {ex.GetType().Name}. {feedbackMessage}");
Comment thread
carzh marked this conversation as resolved.
Outdated
}
}
}
}
Loading