* Return exit code 1 in android test runner if a test failed
* Exit instrumentation with runner exit code
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]);
var simpleTestRunner = new SimpleAndroidTestRunner(true);
+ simpleTestRunner.TestsCompleted += (e, result) =>
+ {
+ if (result.FailedTests > 0)
+ exitCode = 1;
+ };
+
await simpleTestRunner.RunAsync();
Console.WriteLine("----- Done -----");
- return 0;
+ return exitCode;
}
public SimpleAndroidTestRunner(bool verbose)