diff options
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java | 14 | ||||
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLineTest.java | 5 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java index 51a46ccb62..3bde118ad4 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java @@ -369,19 +369,19 @@ public class CcCommonTest extends BuildViewTestCase { " srcs = [ 'library.cc' ],", " nocopts = '-fPIC')"); - assertThat(getCppCompileAction("//a:pic").getArguments()).contains("-fPIC"); - assertThat(getCppCompileAction("//a:libpic.so").getArguments()).contains("-fPIC"); - assertThat(getCppCompileAction("//a:piclib").getArguments()).contains("-fPIC"); - assertThat(getCppCompileAction("//a:nopic").getArguments()).doesNotContain("-fPIC"); - assertThat(getCppCompileAction("//a:libnopic.so").getArguments()).doesNotContain("-fPIC"); - assertThat(getCppCompileAction("//a:nopiclib").getArguments()).doesNotContain("-fPIC"); + assertThat(getCppCompileAction("//a:pic").getArgv()).contains("-fPIC"); + assertThat(getCppCompileAction("//a:libpic.so").getArgv()).contains("-fPIC"); + assertThat(getCppCompileAction("//a:piclib").getArgv()).contains("-fPIC"); + assertThat(getCppCompileAction("//a:nopic").getArgv()).doesNotContain("-fPIC"); + assertThat(getCppCompileAction("//a:libnopic.so").getArgv()).doesNotContain("-fPIC"); + assertThat(getCppCompileAction("//a:nopiclib").getArgv()).doesNotContain("-fPIC"); } @Test public void testPicModeAssembly() throws Exception { useConfiguration("--cpu=k8"); scratch.file("a/BUILD", "cc_library(name='preprocess', srcs=['preprocess.S'])"); - List<String> argv = getCppCompileAction("//a:preprocess").getArguments(); + List<String> argv = getCppCompileAction("//a:preprocess").getArgv(); assertThat(argv).contains("-fPIC"); } diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLineTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLineTest.java index 93d1c69452..e0fd56322a 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLineTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CompileCommandLineTest.java @@ -92,7 +92,7 @@ public class CompileCommandLineTest extends BuildViewTestCase { " }", "}")) .build(); - assertThat(compileCommandLine.getArguments(/* overwrittenVariables= */ null)) + assertThat(compileCommandLine.getArgv(scratchArtifact("a/FakeOutput").getExecPath(), null)) .contains("-some_foo_flag"); } @@ -134,12 +134,13 @@ public class CompileCommandLineTest extends BuildViewTestCase { "}")) .setCoptsFilter(flag -> !flag.contains("i_am_a_flag")) .build(); - return compileCommandLine.getArguments(/* overwrittenVariables= */ null); + return compileCommandLine.getArgv(scratchArtifact("a/FakeOutput").getExecPath(), null); } private Builder makeCompileCommandLineBuilder() throws Exception { return CompileCommandLine.builder( scratchArtifact("a/FakeInput"), + scratchArtifact("a/FakeOutput"), new Predicate<String>() { @Override public boolean apply(String s) { |