diff options
author | 2018-05-02 03:27:17 -0700 | |
---|---|---|
committer | 2018-05-02 03:28:53 -0700 | |
commit | 96c9a289dbfd2f7b107bb82b1353cb965393c584 (patch) | |
tree | d709d11b68ff60a4282a9c05345f309ae047a78d /src/test/java/com/google | |
parent | 74bbbea195809a36a4f530f0cc7609c4216fed50 (diff) |
Fix tests to be compatible with deferred param files.
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
Diffstat (limited to 'src/test/java/com/google')
3 files changed, 1 insertions, 5 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java index c4055107b8..d24f2dc8e3 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java @@ -754,7 +754,7 @@ public class AndroidBinaryTest extends AndroidBuildViewTestCase { 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 diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java index 58fd957346..3b97bcbe96 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java @@ -1831,8 +1831,6 @@ public class AndroidLibraryTest extends AndroidBuildViewTestCase { 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)); diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java index d6d4346519..a414b32649 100644 --- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java +++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java @@ -2315,8 +2315,6 @@ public class SkylarkRuleImplementationFunctionsTest extends SkylarkTestCase { 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 |