Fix the tree (#86691)

* fix type cast error

* update doc
This commit is contained in:
keyonghan 2021-07-19 20:23:45 -07:00 committed by GitHub
parent cabcfd5436
commit a5b9b5774a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ class UploadResultsCommand extends Command<void> {
'service-account-token-file', 'service-account-token-file',
help: 'Authentication token for uploading results.', help: 'Authentication token for uploading results.',
); );
argParser.addOption('test-flaky', help: 'Flag to show whether the test is flaky'); argParser.addOption('test-flaky', help: 'Flag to show whether the test is flaky: "True" or "False"');
argParser.addOption( argParser.addOption(
'git-branch', 'git-branch',
help: '[Flutter infrastructure] Git branch of the current commit. LUCI\n' help: '[Flutter infrastructure] Git branch of the current commit. LUCI\n'
@ -33,7 +33,7 @@ class UploadResultsCommand extends Command<void> {
Future<void> run() async { Future<void> run() async {
final String? resultsPath = argResults!['results-file'] as String?; final String? resultsPath = argResults!['results-file'] as String?;
final String? serviceAccountTokenFile = argResults!['service-account-token-file'] as String?; final String? serviceAccountTokenFile = argResults!['service-account-token-file'] as String?;
final bool? isTestFlaky = argResults!['test-flaky'] as bool?; final String? testFlakyStatus = argResults!['test-flaky'] as String?;
final String? gitBranch = argResults!['git-branch'] as String?; final String? gitBranch = argResults!['git-branch'] as String?;
final String? builderName = argResults!['luci-builder'] as String?; final String? builderName = argResults!['luci-builder'] as String?;
final String? testStatus = argResults!['test-status'] as String?; final String? testStatus = argResults!['test-status'] as String?;
@ -41,7 +41,7 @@ class UploadResultsCommand extends Command<void> {
final Cocoon cocoon = Cocoon(serviceAccountTokenPath: serviceAccountTokenFile); final Cocoon cocoon = Cocoon(serviceAccountTokenPath: serviceAccountTokenFile);
return cocoon.sendResultsPath( return cocoon.sendResultsPath(
resultsPath: resultsPath, resultsPath: resultsPath,
isTestFlaky: isTestFlaky, isTestFlaky: testFlakyStatus == 'True',
gitBranch: gitBranch, gitBranch: gitBranch,
builderName: builderName, builderName: builderName,
testStatus: testStatus, testStatus: testStatus,