This reverts commit 2175e64e4f.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// @dart = 2.8
|
||||
|
||||
import 'package:args/command_runner.dart';
|
||||
|
||||
import 'package:flutter_devicelab/framework/runner.dart';
|
||||
@@ -62,19 +64,19 @@ class TestCommand extends Command<void> {
|
||||
|
||||
@override
|
||||
Future<void> run() async {
|
||||
final List<String> taskArgsRaw = argResults!['task-args'] as List<String>;
|
||||
final List<String> taskArgsRaw = argResults['task-args'] as List<String>;
|
||||
// Prepend '--' to convert args to options when passed to task
|
||||
final List<String> taskArgs = taskArgsRaw.map((String taskArg) => '--$taskArg').toList();
|
||||
print(taskArgs);
|
||||
await runTasks(
|
||||
<String>[argResults!['task'] as String],
|
||||
deviceId: argResults!['device-id'] as String?,
|
||||
gitBranch: argResults!['git-branch'] as String?,
|
||||
localEngine: argResults!['local-engine'] as String?,
|
||||
localEngineSrcPath: argResults!['local-engine-src-path'] as String?,
|
||||
luciBuilder: argResults!['luci-builder'] as String?,
|
||||
resultsPath: argResults!['results-file'] as String?,
|
||||
silent: (argResults!['silent'] as bool?) ?? false,
|
||||
<String>[argResults['task'] as String],
|
||||
deviceId: argResults['device-id'] as String,
|
||||
gitBranch: argResults['git-branch'] as String,
|
||||
localEngine: argResults['local-engine'] as String,
|
||||
localEngineSrcPath: argResults['local-engine-src-path'] as String,
|
||||
luciBuilder: argResults['luci-builder'] as String,
|
||||
resultsPath: argResults['results-file'] as String,
|
||||
silent: argResults['silent'] as bool,
|
||||
taskArgs: taskArgs,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// @dart = 2.8
|
||||
|
||||
import 'package:args/command_runner.dart';
|
||||
|
||||
import '../framework/cocoon.dart';
|
||||
@@ -23,8 +25,8 @@ class UploadMetricsCommand extends Command<void> {
|
||||
|
||||
@override
|
||||
Future<void> run() async {
|
||||
final String resultsPath = argResults!['results-file'] as String;
|
||||
final String? serviceAccountTokenFile = argResults!['service-account-token-file'] as String?;
|
||||
final String resultsPath = argResults['results-file'] as String;
|
||||
final String serviceAccountTokenFile = argResults['service-account-token-file'] as String;
|
||||
|
||||
final Cocoon cocoon = Cocoon(serviceAccountTokenPath: serviceAccountTokenFile);
|
||||
return cocoon.sendResultsPath(resultsPath);
|
||||
|
||||
Reference in New Issue
Block a user