aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/rules
diff options
context:
space:
mode:
authorGravatar hlopko <hlopko@google.com>2017-07-18 15:21:04 +0200
committerGravatar Klaus Aehlig <aehlig@google.com>2017-07-19 10:19:04 +0200
commit5518ce1f0d9a5a12dbf54ba3a6bc2e10d1cae979 (patch)
tree1f0b87a8804fa2e96fbd9c99f294e3b1210baed9 /src/test/java/com/google/devtools/build/lib/rules
parent1020668183c1f66928db8757f315505e5d66e454 (diff)
Report error when action_config for given C++ compile action is not defined
RELNOTES: None. PiperOrigin-RevId: 162344071
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/CcLibraryConfiguredTargetTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java
index 0a3bcc09c8..498564c65f 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcLibraryConfiguredTargetTest.java
@@ -125,6 +125,23 @@ public class CcLibraryConfiguredTargetTest extends BuildViewTestCase {
}
@Test
+ public void testMisconfiguredCrosstoolRaisesErrorWhenCompiling() throws Exception {
+ AnalysisMock.get()
+ .ccSupport()
+ .setupCrosstool(
+ mockToolsConfig,
+ MockCcSupport.NO_LEGACY_FEATURES_FEATURE,
+ MockCcSupport.INCOMPLETE_STATIC_LIBRARY_ACTION_CONFIG);
+ useConfiguration();
+
+ checkError(
+ "test",
+ "test",
+ "Expected action_config for 'c++-compile' to be configured",
+ "cc_library(name = 'test', srcs = ['test.cc'])");
+ }
+
+ @Test
public void testFilesToBuild() throws Exception {
useConfiguration("--cpu=k8");
ConfiguredTarget hello = getConfiguredTarget("//hello:hello");