blob: 8db110577168aeb0977959a6604e7a1f3b42f05d [file] [log] [blame]
Damien Martin-Guillerezf88f4d82015-09-25 13:56:55 +00001// Copyright 2014 The Bazel Authors. All rights reserved.
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +01002//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package com.google.devtools.build.lib.testutil;
16
17import com.google.common.collect.ImmutableList;
Nathan Harmata3ad56452016-06-10 16:17:45 +000018import com.google.devtools.build.lib.packages.PackageFactory;
Luis Fernando Pino Duqueb1b28b62016-02-25 14:25:19 +000019import com.google.devtools.build.lib.runtime.proto.InvocationPolicyOuterClass.InvocationPolicy;
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010020
21/**
22 * Various constants required by the tests.
23 */
24public class TestConstants {
25 private TestConstants() {
26 }
27
Luis Fernando Pino Duquebe102182016-05-23 14:03:55 +000028 public static final String PRODUCT_NAME = "bazel";
29
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010030 /**
31 * A list of all embedded binaries that go into the regular Bazel binary.
32 */
33 public static final ImmutableList<String> EMBEDDED_TOOLS = ImmutableList.of(
Philipp Wollermannf3a20322015-09-08 16:56:00 +000034 "build_interface_so",
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010035 "build-runfiles",
Philipp Wollermann278814b2016-07-15 14:41:54 +000036 "linux-sandbox",
Chris Parsonsf4888182016-01-08 00:42:14 +000037 "process-wrapper",
38 "xcode-locator");
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010039
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010040 /**
41 * Location in the bazel repo where embedded binaries come from.
42 */
Damien Martin-Guillerezb09c97a2015-04-01 11:17:16 +000043 public static final ImmutableList<String> EMBEDDED_SCRIPTS_PATHS = ImmutableList.of(
Kristina Chodorow93fbc3e2016-04-27 17:03:28 +000044 "io_bazel/src/main/tools");
Ulf Adamsff031542015-02-24 10:00:51 +000045
46 /**
Han-Wen Nienhuysceae8c52015-09-22 16:24:45 +000047 * Default workspace name.
48 */
Kristina Chodorow4b71d2e2016-05-03 15:06:39 +000049 public static final String WORKSPACE_NAME = "__main__";
Han-Wen Nienhuysceae8c52015-09-22 16:24:45 +000050
51 /**
Ulf Adamsd5baac02015-02-25 14:18:14 +000052 * Name of a class with an INSTANCE field of type AnalysisMock to be used for analysis tests.
53 */
Ulf Adams7c5eefb2015-03-03 14:52:46 +000054 public static final String TEST_ANALYSIS_MOCK =
Ulf Adams570c17f2015-04-23 18:12:56 +000055 "com.google.devtools.build.lib.analysis.mock.BazelAnalysisMock";
Ulf Adamsd5baac02015-02-25 14:18:14 +000056
57 /**
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010058 * Directory where we can find bazel's Java tests, relative to a test's runfiles directory.
59 */
Kristina Chodorow93fbc3e2016-04-27 17:03:28 +000060 public static final String JAVATESTS_ROOT = "io_bazel/src/test/java/";
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010061
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010062 public static final String TEST_RULE_CLASS_PROVIDER =
63 "com.google.devtools.build.lib.bazel.rules.BazelRuleClassProvider";
Kristina Chodorow76d94b12015-12-16 16:12:52 +000064 public static final String TEST_RULE_MODULE =
65 "com.google.devtools.build.lib.bazel.rules.BazelRulesModule";
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010066 public static final ImmutableList<String> IGNORED_MESSAGE_PREFIXES = ImmutableList.<String>of();
Ulf Adamsd87465e2015-04-17 13:16:51 +000067
Laszlo Csomor8539a122016-09-20 15:40:42 +000068 public static final String GCC_INCLUDE_PATH = "external/bazel_tools/tools/cpp/gcc3";
Dmitry Lomovece87c22015-11-26 19:22:56 +000069
70 public static final String TOOLS_REPOSITORY = "@bazel_tools";
Dmitry Lomove0a69aa2015-11-30 16:25:40 +000071
Dmitry Lomov20262fd2015-12-10 13:48:35 +000072 public static final String TOOLS_REPOSITORY_PATH = "tools/cpp";
Ulf Adamsc934fad2015-12-22 07:42:11 +000073
74 public static final ImmutableList<String> DOCS_RULES_PATHS = ImmutableList.of(
75 "src/main/java/com/google/devtools/build/lib/rules");
Luis Fernando Pino Duqueb1b28b62016-02-25 14:25:19 +000076
77 public static final InvocationPolicy TEST_INVOCATION_POLICY =
78 InvocationPolicy.getDefaultInstance();
Nathan Harmata3ad56452016-06-10 16:17:45 +000079
80 public static final PackageFactory.FactoryForTesting PACKAGE_FACTORY_FACTORY_FOR_TESTING =
81 PackageFactoryFactoryForBazelUnitTests.INSTANCE;
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010082}