Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LinuxBionic] Disable RemoteExecutor during test runs #76495

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions eng/testing/BionicRunOnDevice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,23 @@ public class SimpleAndroidTestRunner : AndroidApplicationEntryPoint, IDevice

public static async Task<int> 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) =>
{
Expand Down