diff --git a/src/tests/nativeaot/SmokeTests/DynamicGenerics/DynamicGenerics.main.cs b/src/tests/nativeaot/SmokeTests/DynamicGenerics/DynamicGenerics.main.cs index 8c3ffe4145600e..5b99da80b3c00d 100644 --- a/src/tests/nativeaot/SmokeTests/DynamicGenerics/DynamicGenerics.main.cs +++ b/src/tests/nativeaot/SmokeTests/DynamicGenerics/DynamicGenerics.main.cs @@ -165,12 +165,7 @@ public static int TestEntryPoint() new CoreFXTestLibrary.Internal.TestInfo("GenericVirtualMethods.TestCoAndContraVariantCalls", () => global::GenericVirtualMethods.TestCoAndContraVariantCalls(), null) }; - // This is a placeholder for the RunTests() call below that expects an - // args array as a parameter. Tests using the Merged Wrapper system rely - // on the TestEntryPoint(), which receives no parameters, whereas the - // legacy system had a Main(string[] args) signature. However, in this - // specific test's case, the args array was always empty. - string[] args = new string[] { }; + string[] args = System.Environment.GetCommandLineArgs()[1..]; bool passed = CoreFXTestLibrary.Internal.Runner.RunTests(tests, args); CoreFXTestLibrary.Logger.LogInformation("Passed: {0}, Failed: {1}, Number of Tests Run: {2}",