Damien Martin-Guillerez | f88f4d8 | 2015-09-25 13:56:55 +0000 | [diff] [blame] | 1 | // Copyright 2014 The Bazel Authors. All rights reserved. |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 2 | // |
| 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 | |
| 15 | package com.google.devtools.build.lib.testutil; |
| 16 | |
| 17 | import com.google.common.collect.ImmutableList; |
Nathan Harmata | 3ad5645 | 2016-06-10 16:17:45 +0000 | [diff] [blame] | 18 | import com.google.devtools.build.lib.packages.PackageFactory; |
Luis Fernando Pino Duque | b1b28b6 | 2016-02-25 14:25:19 +0000 | [diff] [blame] | 19 | import com.google.devtools.build.lib.runtime.proto.InvocationPolicyOuterClass.InvocationPolicy; |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 20 | |
| 21 | /** |
| 22 | * Various constants required by the tests. |
| 23 | */ |
| 24 | public class TestConstants { |
| 25 | private TestConstants() { |
| 26 | } |
| 27 | |
Luis Fernando Pino Duque | be10218 | 2016-05-23 14:03:55 +0000 | [diff] [blame] | 28 | public static final String PRODUCT_NAME = "bazel"; |
| 29 | |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 30 | /** |
| 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 Wollermann | f3a2032 | 2015-09-08 16:56:00 +0000 | [diff] [blame] | 34 | "build_interface_so", |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 35 | "build-runfiles", |
Philipp Wollermann | 278814b | 2016-07-15 14:41:54 +0000 | [diff] [blame] | 36 | "linux-sandbox", |
Chris Parsons | f488818 | 2016-01-08 00:42:14 +0000 | [diff] [blame] | 37 | "process-wrapper", |
| 38 | "xcode-locator"); |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 39 | |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 40 | /** |
| 41 | * Location in the bazel repo where embedded binaries come from. |
| 42 | */ |
Damien Martin-Guillerez | b09c97a | 2015-04-01 11:17:16 +0000 | [diff] [blame] | 43 | public static final ImmutableList<String> EMBEDDED_SCRIPTS_PATHS = ImmutableList.of( |
Kristina Chodorow | 93fbc3e | 2016-04-27 17:03:28 +0000 | [diff] [blame] | 44 | "io_bazel/src/main/tools"); |
Ulf Adams | ff03154 | 2015-02-24 10:00:51 +0000 | [diff] [blame] | 45 | |
| 46 | /** |
Han-Wen Nienhuys | ceae8c5 | 2015-09-22 16:24:45 +0000 | [diff] [blame] | 47 | * Default workspace name. |
| 48 | */ |
Kristina Chodorow | 4b71d2e | 2016-05-03 15:06:39 +0000 | [diff] [blame] | 49 | public static final String WORKSPACE_NAME = "__main__"; |
Han-Wen Nienhuys | ceae8c5 | 2015-09-22 16:24:45 +0000 | [diff] [blame] | 50 | |
| 51 | /** |
Ulf Adams | d5baac0 | 2015-02-25 14:18:14 +0000 | [diff] [blame] | 52 | * Name of a class with an INSTANCE field of type AnalysisMock to be used for analysis tests. |
| 53 | */ |
Ulf Adams | 7c5eefb | 2015-03-03 14:52:46 +0000 | [diff] [blame] | 54 | public static final String TEST_ANALYSIS_MOCK = |
Ulf Adams | 570c17f | 2015-04-23 18:12:56 +0000 | [diff] [blame] | 55 | "com.google.devtools.build.lib.analysis.mock.BazelAnalysisMock"; |
Ulf Adams | d5baac0 | 2015-02-25 14:18:14 +0000 | [diff] [blame] | 56 | |
| 57 | /** |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 58 | * Directory where we can find bazel's Java tests, relative to a test's runfiles directory. |
| 59 | */ |
Kristina Chodorow | 93fbc3e | 2016-04-27 17:03:28 +0000 | [diff] [blame] | 60 | public static final String JAVATESTS_ROOT = "io_bazel/src/test/java/"; |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 61 | |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 62 | public static final String TEST_RULE_CLASS_PROVIDER = |
| 63 | "com.google.devtools.build.lib.bazel.rules.BazelRuleClassProvider"; |
Kristina Chodorow | 76d94b1 | 2015-12-16 16:12:52 +0000 | [diff] [blame] | 64 | public static final String TEST_RULE_MODULE = |
| 65 | "com.google.devtools.build.lib.bazel.rules.BazelRulesModule"; |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 66 | public static final ImmutableList<String> IGNORED_MESSAGE_PREFIXES = ImmutableList.<String>of(); |
Ulf Adams | d87465e | 2015-04-17 13:16:51 +0000 | [diff] [blame] | 67 | |
Laszlo Csomor | 8539a12 | 2016-09-20 15:40:42 +0000 | [diff] [blame] | 68 | public static final String GCC_INCLUDE_PATH = "external/bazel_tools/tools/cpp/gcc3"; |
Dmitry Lomov | ece87c2 | 2015-11-26 19:22:56 +0000 | [diff] [blame] | 69 | |
| 70 | public static final String TOOLS_REPOSITORY = "@bazel_tools"; |
Dmitry Lomov | e0a69aa | 2015-11-30 16:25:40 +0000 | [diff] [blame] | 71 | |
Dmitry Lomov | 20262fd | 2015-12-10 13:48:35 +0000 | [diff] [blame] | 72 | public static final String TOOLS_REPOSITORY_PATH = "tools/cpp"; |
Ulf Adams | c934fad | 2015-12-22 07:42:11 +0000 | [diff] [blame] | 73 | |
| 74 | public static final ImmutableList<String> DOCS_RULES_PATHS = ImmutableList.of( |
| 75 | "src/main/java/com/google/devtools/build/lib/rules"); |
Luis Fernando Pino Duque | b1b28b6 | 2016-02-25 14:25:19 +0000 | [diff] [blame] | 76 | |
| 77 | public static final InvocationPolicy TEST_INVOCATION_POLICY = |
| 78 | InvocationPolicy.getDefaultInstance(); |
Nathan Harmata | 3ad5645 | 2016-06-10 16:17:45 +0000 | [diff] [blame] | 79 | |
| 80 | public static final PackageFactory.FactoryForTesting PACKAGE_FACTORY_FACTORY_FOR_TESTING = |
| 81 | PackageFactoryFactoryForBazelUnitTests.INSTANCE; |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 82 | } |