diff --git a/eng/testing/BionicRunOnDevice.sh b/eng/testing/BionicRunOnDevice.sh index 911ae7690cec9..3d6356decd365 100755 --- a/eng/testing/BionicRunOnDevice.sh +++ b/eng/testing/BionicRunOnDevice.sh @@ -66,4 +66,8 @@ cd "$currentDirectory" || exit 1 if [ -e "${currentTest}.deps.json" ]; then depsFileArg="--depsfile ${currentTest}.deps.json" fi + +# Make sure LinuxBionic does not support RemoteExecutor in tests +DOTNET_REMOTEEXECUTOR_SUPPORTED="0" + $runtimeExe exec --runtimeconfig "${currentTest}".runtimeconfig.json ${depsFileArg} xunit.console.dll "${currentTest}".dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing diff --git a/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs b/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs index e181c37290adc..425fc115d0e53 100644 --- a/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs +++ b/src/libraries/Common/tests/AndroidTestRunner/AndroidTestRunner.cs @@ -21,16 +21,23 @@ public class SimpleAndroidTestRunner : AndroidApplicationEntryPoint, IDevice public static async Task Main(string[] args) { + int exitCode = 0; + s_testLibs = Directory.GetFiles(Environment.CurrentDirectory, "*.Tests.dll").ToList(); if (s_testLibs.Count < 1) { Console.WriteLine($"Test libs were not found (*.Tests.dll was not found in {Environment.CurrentDirectory})"); return -1; } - int exitCode = 0; + s_MainTestName = Path.GetFileNameWithoutExtension(s_testLibs[0]); + string? verbose = Environment.GetEnvironmentVariable("XUNIT_VERBOSE")?.ToLower(); bool enableMaxThreads = (Environment.GetEnvironmentVariable("XUNIT_SINGLE_THREADED") != "1"); + + // Specify no remote executor support for both Andorid and LinuxBionic + Environment.SetEnvironmentVariable("DOTNET_REMOTEEXECUTOR_SUPPORTED", "0"); + var simpleTestRunner = new SimpleAndroidTestRunner(verbose == "true" || verbose == "1", enableMaxThreads); simpleTestRunner.TestsCompleted += (e, result) => {