From: Alexander Köplinger Date: Sat, 30 May 2020 08:02:50 +0000 (+0200) Subject: Bump to updated WebAssembly runner from xharness (#37178) X-Git-Tag: submit/tizen/20210909.063632~7692 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ef008e29b7f52d6dee8be3ea0bb675651cccb8f;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Bump to updated WebAssembly runner from xharness (#37178) --- diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 51d9b24..1654c6c 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "1.0.0-prerelease.20271.3", + "version": "1.0.0-prerelease.20279.2", "commands": [ "xharness" ] diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a4ea9bf..5ec27d0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -174,9 +174,9 @@ https://github.com/mono/linker d51be363c75855fb19d7c30c2600cd627d7e359d - + https://github.com/dotnet/xharness - 8f6cc04f53cb6759758ffc97c9c8ca3ab4802f7f + 94251a8d989891191b5dd915eec82de36d8404a1 diff --git a/eng/Versions.props b/eng/Versions.props index b4838ec..750a30f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -106,7 +106,7 @@ 4.8.0 16.7.0-preview-20200521-01 - 1.0.0-prerelease.20277.1 + 1.0.0-prerelease.20279.2 2.4.1 1.2.1 2.0.5 diff --git a/eng/testing/WasmRunnerTemplate.sh b/eng/testing/WasmRunnerTemplate.sh index 611a28e..8ae1e35 100644 --- a/eng/testing/WasmRunnerTemplate.sh +++ b/eng/testing/WasmRunnerTemplate.sh @@ -1,12 +1,10 @@ set -ev EXECUTION_DIR=$(dirname $0) -TEST_NAME=$1 -TARGET_ARCH=$2 -echo "Test: $1 Arch: $2" +echo "Test: $1" cd $EXECUTION_DIR -v8 --expose_wasm runtime.js -- --enable-gc --run WasmTestRunner.dll $TEST_NAME.dll +v8 --expose_wasm runtime.js -- --enable-gc --run WasmTestRunner.dll $* exit 0 diff --git a/eng/testing/tests.targets b/eng/testing/tests.targets index c84fec8..6d1655b 100644 --- a/eng/testing/tests.targets +++ b/eng/testing/tests.targets @@ -83,6 +83,7 @@ "$(RunScriptOutputPath)" --runtime-path "$(TestHostRootPath.TrimEnd('\/'))" $(RunTestsCommand) --rsp-file "$(TestRspFile)" "$(RunScriptOutputPath)" $(AssemblyName) $(TargetArchitecture) + "$(RunScriptOutputPath)" $(AssemblyName).dll $(_withoutCategories.Replace(';', ' -notrait category=')) diff --git a/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs b/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs index 9f232f5..1360ad0 100644 --- a/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs +++ b/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs @@ -12,8 +12,8 @@ using System.Threading; using System.Threading.Tasks; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; -using Microsoft.DotNet.XHarness.Tests.Runners; -using Microsoft.DotNet.XHarness.Tests.Runners.Core; +using Microsoft.DotNet.XHarness.TestRunners.Common; +using Microsoft.DotNet.XHarness.TestRunners.Xunit; public class SimpleAndroidTestRunner : AndroidApplicationEntryPoint, IDevice { @@ -72,8 +72,6 @@ public class SimpleAndroidTestRunner : AndroidApplicationEntryPoint, IDevice protected override IDevice Device => this; - protected override TestRunnerType TestRunner => TestRunnerType.Xunit; - protected override string? IgnoreFilesDirectory => null; protected override string IgnoredTraitsFilePath => "xunit-excludes.txt"; diff --git a/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.csproj b/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.csproj index 6f73d8e..d035012 100644 --- a/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.csproj +++ b/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.csproj @@ -6,6 +6,6 @@ - + diff --git a/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs index 22979b7..9fbfbf4 100644 --- a/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs +++ b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs @@ -12,8 +12,8 @@ using System.Threading; using System.Threading.Tasks; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; -using Microsoft.DotNet.XHarness.Tests.Runners; -using Microsoft.DotNet.XHarness.Tests.Runners.Core; +using Microsoft.DotNet.XHarness.TestRunners.Common; +using Microsoft.DotNet.XHarness.TestRunners.Xunit; public class SimpleTestRunner : iOSApplicationEntryPoint, IDevice { @@ -128,8 +128,6 @@ public class SimpleTestRunner : iOSApplicationEntryPoint, IDevice protected override IDevice Device => this; - protected override TestRunnerType TestRunner => TestRunnerType.Xunit; - protected override string? IgnoreFilesDirectory => null; protected override string IgnoredTraitsFilePath => "xunit-excludes.txt"; diff --git a/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.csproj b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.csproj index 906eea3..74636ca 100644 --- a/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.csproj +++ b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.csproj @@ -6,6 +6,6 @@ - + diff --git a/src/libraries/Common/tests/WasmTestRunner/WasmTestRunner.cs b/src/libraries/Common/tests/WasmTestRunner/WasmTestRunner.cs index 0ee5116..46c3c8b 100644 --- a/src/libraries/Common/tests/WasmTestRunner/WasmTestRunner.cs +++ b/src/libraries/Common/tests/WasmTestRunner/WasmTestRunner.cs @@ -3,27 +3,40 @@ // See the LICENSE file in the project root for more information. using System; -using System.Linq; -using System.Text; -using System.IO; using System.Collections.Generic; -using System.Reflection; -using System.Threading; -using System.Threading.Tasks; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; -public class WasmTestRunner +using Microsoft.DotNet.XHarness.TestRunners.Xunit; + +public class SimpleWasmTestRunner : WasmApplicationEntryPoint { + protected override string TestAssembly { get; set; } = ""; + protected override IEnumerable ExcludedTraits { get; set; } = new List(); + public static int Main(string[] args) { - Console.Write("Args: "); - foreach (string arg in args) + var testAssembly = args[0]; + var excludedTraits = new List(); + + for (int i = 1; i < args.Length; i++) { - Console.Write(arg); + var option = args[i]; + switch (option) + { + case "-notrait": + excludedTraits.Add (args[i + 1]); + i++; + break; + default: + throw new ArgumentException($"Invalid argument '{option}'."); + } } - Console.WriteLine("."); - return 0; + var runner = new SimpleWasmTestRunner() + { + TestAssembly = testAssembly, + ExcludedTraits = excludedTraits + }; + + return runner.Run(); } } diff --git a/src/libraries/Common/tests/WasmTestRunner/WasmTestRunner.csproj b/src/libraries/Common/tests/WasmTestRunner/WasmTestRunner.csproj index 7d68c49..df27382 100644 --- a/src/libraries/Common/tests/WasmTestRunner/WasmTestRunner.csproj +++ b/src/libraries/Common/tests/WasmTestRunner/WasmTestRunner.csproj @@ -6,6 +6,6 @@ - +