Skip to content

Commit

Permalink
Fix tests to be compatible with deferred param files.
Browse files Browse the repository at this point in the history
For the most part, this involves removing assertions that there are param files as inputs, and that the param file arguments appears in the arguments list.

RELNOTES: None
PiperOrigin-RevId: 195070407
  • Loading branch information
tomlu authored and Copybara-Service committed May 2, 2018
1 parent 74bbbea commit 96c9a28
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ public void testIncrementalDexingAfterProguard_explicitDexShards() throws Except
getGeneratingSpawnAction(getBinArtifact("_dx/top/shard1.jar.dex.zip", topTarget));
assertThat(mergeAction.getArguments()).doesNotContain("--main-dex-list");
assertThat(ActionsTestUtil.baseArtifactNames(getNonToolInputs(mergeAction)))
.containsExactly("shard1.jar", "shard1.jar.dex.zip-2.params");
.contains("shard1.jar");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1831,8 +1831,6 @@ public void nativeHeaderOutputs() throws Exception {
FileConfiguredTarget target = getFileConfiguredTarget("//java/com/google/jni:libjni.jar");
SpawnAction action = (SpawnAction) getGeneratingAction(target.getArtifact());
String outputPath = outputPath(action, "java/com/google/jni/libjni-native-header.jar");
assertThat(action.getArguments())
.contains("@" + getBinArtifact("libjni.jar-2.params", target).getExecPathString());
Iterable<String> result = paramFileArgsForAction(action);
assertThat(Joiner.on(' ').join(result))
.contains(Joiner.on(' ').join("--native_header_output", outputPath));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2315,8 +2315,6 @@ public void testLazyArgsWithParamFile() throws Exception {
Artifact output = getBinArtifact("out", ct);
SpawnAction action = (SpawnAction) getGeneratingAction(output);
assertThat(paramFileArgsForAction(action)).containsExactly("--foo");
// Assert that there is a file argument. Don't bother matching the exact string
assertThat(action.getArguments().stream().anyMatch(arg -> arg.matches("--file=.*"))).isTrue();
}

@Test
Expand Down

0 comments on commit 96c9a28

Please sign in to comment.