Use RepositoryName instead of String for the "toolsRepository" concept
This thing is often used to construct absolute labels (blegh). Fortunately RepositoryName is a drop-in replacement for String for these cases. Beyond that, this change also provides a bit of type safety, so hooray.
PiperOrigin-RevId: 415507946
diff --git a/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java b/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java
index 669db8f..c8381ac 100644
--- a/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java
+++ b/src/test/java/com/google/devtools/build/lib/testutil/TestConstants.java
@@ -17,6 +17,7 @@
import static com.google.devtools.build.lib.rules.cpp.CppRuleClasses.CROSSTOOL_LABEL;
import com.google.common.collect.ImmutableList;
+import com.google.devtools.build.lib.cmdline.RepositoryName;
/**
* Various constants required by the tests.
@@ -98,7 +99,7 @@
public static final String MOCK_CC_CROSSTOOL_PATH = "tools/cpp";
/** The workspace repository label under which built-in tools reside. */
- public static final String TOOLS_REPOSITORY = "@bazel_tools";
+ public static final RepositoryName TOOLS_REPOSITORY = RepositoryName.BAZEL_TOOLS;
/** The file path in which to create files so that they end up under {@link #TOOLS_REPOSITORY}. */
public static final String TOOLS_REPOSITORY_SCRATCH = "embedded_tools/";