Skip to content

Commit

Permalink
Change flag name --start_type to --start, to be consistent with adb o…
Browse files Browse the repository at this point in the history
…ptions flag.

Add check to test options, default value of testFilter is null.

RELNOTES: None
PiperOrigin-RevId: 178337368
  • Loading branch information
Googler authored and Copybara-Service committed Dec 8, 2017
1 parent 16514d3 commit c191413
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import static com.google.devtools.build.lib.analysis.OutputGroupProvider.INTERNAL_SUFFIX;

import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.devtools.build.lib.analysis.ConfiguredTarget;
Expand Down Expand Up @@ -247,7 +248,7 @@ public ExitCode exec(CommandEnvironment env, OptionsProvider options) {
}

// Collect relevant adb options
cmdLine.add("--start_type=" + adbOptions.start);
cmdLine.add("--start=" + adbOptions.start);
if (!adbOptions.adb.isEmpty()) {
cmdLine.add("--adb=" + adbOptions.adb);
}
Expand All @@ -262,7 +263,8 @@ public ExitCode exec(CommandEnvironment env, OptionsProvider options) {

// Collect relevant test options
TestOptions testOptions = options.getOptions(TestOptions.class);
if (!testOptions.testFilter.isEmpty()){
// Default value of testFilter is null.
if (!Strings.isNullOrEmpty(testOptions.testFilter)){
cmdLine.add("--test_filter=" + testOptions.testFilter);
}
for (String arg : testOptions.testArguments) {
Expand Down

0 comments on commit c191413

Please sign in to comment.