BEGIN_PUBLIC
remove --master_bazelrc from our codebase + update documentation.
END_PUBLIC
PiperOrigin-RevId: 434466313
diff --git a/src/test/cpp/option_processor_test.cc b/src/test/cpp/option_processor_test.cc
index 504ea1c..b833c7e 100644
--- a/src/test/cpp/option_processor_test.cc
+++ b/src/test/cpp/option_processor_test.cc
@@ -240,9 +240,9 @@
TEST_F(OptionProcessorTest, SplitCommandLineWithAllParams) {
SuccessfulSplitStartupOptionsTest(
- {"bazel", "--nomaster_bazelrc", "build", "--bar", ":mytarget"},
+ {"bazel", "--ignore_all_rc_files", "build", "--bar", ":mytarget"},
CommandLine("bazel",
- {"--nomaster_bazelrc"},
+ {"--ignore_all_rc_files"},
"build",
{"--bar", ":mytarget"}));
}
@@ -276,9 +276,10 @@
TEST_F(OptionProcessorTest, SplitCommandLineWithMultipleStartup) {
SuccessfulSplitStartupOptionsTest(
- {"bazel", "--bazelrc", "foo", "--nomaster_bazelrc", "build", ":mytarget"},
+ {"bazel", "--bazelrc", "foo", "--ignore_all_rc_files", "build",
+ ":mytarget"},
CommandLine("bazel",
- {"--bazelrc=foo", "--nomaster_bazelrc"},
+ {"--bazelrc=foo", "--ignore_all_rc_files"},
"build",
{":mytarget"}));
}
@@ -335,9 +336,9 @@
TEST_F(OptionProcessorTest, SplitCommandLineWithDashDash) {
SuccessfulSplitStartupOptionsTest(
- {"bazel", "--nomaster_bazelrc", "build", "--b", "--", ":mytarget"},
+ {"bazel", "--ignore_all_rc_files", "build", "--b", "--", ":mytarget"},
CommandLine("bazel",
- {"--nomaster_bazelrc"},
+ {"--ignore_all_rc_files"},
"build",
{"--b", "--", ":mytarget"}));
}
@@ -403,6 +404,15 @@
std::vector<std::string> expected = {foo_path};
ASSERT_EQ(expected, internal::DedupeBlazercPaths(input));
}
+
+
+TEST_F(OptionProcessorTest,
+ SplitCommandLineFailsWithDeprecatedOptionInStartupArgs) {
+ FailedSplitStartupOptionsTest(
+ {"bazel", "--nomaster_bazelrc"},
+ "Unknown startup option: '--nomaster_bazelrc'.\n"
+ " For more info, run 'bazel help startup_options'.");
+}
#endif // !defined(_WIN32) && !defined(__CYGWIN__)
} // namespace blaze