Devicelab android emulator (#113472)

* Testing whether emulator is possible.

* Adding changes to see if emulator can be used from recipe.

* adding emulator support.

* Add the emulator flag for testing.

* Using string for boolean since it cannot be parsed in properties

* Checking to see if these changes are being used.

* Updated bool back to string

* Remove trailing whitespace from file.
This commit is contained in:
Ricardo Amador
2023-01-17 14:01:11 -08:00
committed by GitHub
parent 0449030a96
commit f989d551ce
5 changed files with 28 additions and 0 deletions

View File

@@ -62,6 +62,9 @@ Future<void> main(List<String> rawArgs) async {
/// Path to write test results to.
final String? resultsPath = args['results-file'] as String?;
/// Use an emulator for this test if it is an android test.
final bool useEmulator = (args['use-emulator'] as bool?) ?? false;
if (args.wasParsed('list')) {
for (int i = 0; i < taskNames.length; i++) {
print('${(i + 1).toString().padLeft(3)} - ${taskNames[i]}');
@@ -107,6 +110,7 @@ Future<void> main(List<String> rawArgs) async {
gitBranch: gitBranch,
luciBuilder: luciBuilder,
resultsPath: resultsPath,
useEmulator: useEmulator,
);
}
}
@@ -319,6 +323,11 @@ ArgParser createArgParser(List<String> taskNames) {
'running when a task is completed. If any Dart processes are terminated '
'in this way, the test is considered to have failed.',
)
..addFlag(
'use-emulator',
help: 'If this is an android test, use an emulator to run the test instead of '
'a physical device.'
)
..addMultiOption(
'test',
hide: true,