From 6e8944130d8420d73865017d7ef0b7c0d7c1e5b7 Mon Sep 17 00:00:00 2001 From: Mitchell Hwang Date: Wed, 12 May 2021 15:00:00 -0400 Subject: [PATCH] [iOS][tvOS][tests] Re add ios tvos simulator functional tests (#52606) * Revert "[iOS][tvOS] Remove AOT functional test projects (#52574)" This reverts commit 16083f91a8c7b1cf246d8f8138950e1dcd7721d1. * Cleanup iOS tvOS functional tests and test proj file Co-authored-by: Mitchell Hwang --- src/libraries/tests.proj | 8 ++++++- .../iOS/Simulator/AOT/Program.cs | 22 +++++++++++++++++++ .../AOT/iOS.Simulator.Aot.Test.csproj | 18 +++++++++++++++ .../tvOS/Simulator/AOT/Program.cs | 22 +++++++++++++++++++ .../AOT/tvOS.Simulator.Aot.Test.csproj | 17 ++++++++++++++ 5 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs create mode 100644 src/tests/FunctionalTests/iOS/Simulator/AOT/iOS.Simulator.Aot.Test.csproj create mode 100644 src/tests/FunctionalTests/tvOS/Simulator/AOT/Program.cs create mode 100644 src/tests/FunctionalTests/tvOS/Simulator/AOT/tvOS.Simulator.Aot.Test.csproj diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 21c306e3a9e99..1862f4493ba8c 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -170,7 +170,9 @@ - + + @@ -180,6 +182,10 @@ + + + diff --git a/src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs b/src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs new file mode 100644 index 0000000000000..437f6843a36fc --- /dev/null +++ b/src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs @@ -0,0 +1,22 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Runtime.InteropServices; + +public static class Program +{ + [DllImport("__Internal")] + public static extern void mono_ios_set_summary (string value); + + public static async Task Main(string[] args) + { + mono_ios_set_summary($"Starting functional test"); + Console.WriteLine("Done!"); + await Task.Delay(5000); + + return 42; + } +} diff --git a/src/tests/FunctionalTests/iOS/Simulator/AOT/iOS.Simulator.Aot.Test.csproj b/src/tests/FunctionalTests/iOS/Simulator/AOT/iOS.Simulator.Aot.Test.csproj new file mode 100644 index 0000000000000..c2df960184d6d --- /dev/null +++ b/src/tests/FunctionalTests/iOS/Simulator/AOT/iOS.Simulator.Aot.Test.csproj @@ -0,0 +1,18 @@ + + + + Exe + false + true + true + $(NetCoreAppCurrent) + iOSSimulator + iOS.Simulator.Aot.Test.dll + false + 42 + + + + + + diff --git a/src/tests/FunctionalTests/tvOS/Simulator/AOT/Program.cs b/src/tests/FunctionalTests/tvOS/Simulator/AOT/Program.cs new file mode 100644 index 0000000000000..437f6843a36fc --- /dev/null +++ b/src/tests/FunctionalTests/tvOS/Simulator/AOT/Program.cs @@ -0,0 +1,22 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Runtime.InteropServices; + +public static class Program +{ + [DllImport("__Internal")] + public static extern void mono_ios_set_summary (string value); + + public static async Task Main(string[] args) + { + mono_ios_set_summary($"Starting functional test"); + Console.WriteLine("Done!"); + await Task.Delay(5000); + + return 42; + } +} diff --git a/src/tests/FunctionalTests/tvOS/Simulator/AOT/tvOS.Simulator.Aot.Test.csproj b/src/tests/FunctionalTests/tvOS/Simulator/AOT/tvOS.Simulator.Aot.Test.csproj new file mode 100644 index 0000000000000..66d83fd77151a --- /dev/null +++ b/src/tests/FunctionalTests/tvOS/Simulator/AOT/tvOS.Simulator.Aot.Test.csproj @@ -0,0 +1,17 @@ + + + + Exe + false + true + true + $(NetCoreAppCurrent) + tvOS.Simulator.Aot.Test.dll + false + 42 + + + + + +