diff --git a/test/BUILD.gn b/test/BUILD.gn index 96321ee2d9..401ffcf3e2 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -264,12 +264,6 @@ if (rtc_include_tests) { "//testing/gtest", "//third_party/abseil-cpp/absl/flags:flag", "//third_party/abseil-cpp/absl/flags:parse", - - # TODO(bugs.webrtc.org/9792): This is needed for downstream projects on - # Android, where it's replaced by an internal version of fileutils that - # has a certain flag. Remove this once the internal fileutils has been - # eliminated. - "../test:fileutils", ] } diff --git a/test/test_main_lib.cc b/test/test_main_lib.cc index 178eda7c75..df74182850 100644 --- a/test/test_main_lib.cc +++ b/test/test_main_lib.cc @@ -27,8 +27,6 @@ #include "test/field_trial.h" #include "test/gmock.h" #include "test/gtest.h" -#include "test/testsupport/file_utils.h" -#include "test/testsupport/file_utils_override.h" #include "test/testsupport/perf_test.h" #include "test/testsupport/resources_dir_flag.h" @@ -108,9 +106,10 @@ class TestMainImpl : public TestMain { ::testing::InitGoogleMock(argc, argv); absl::ParseCommandLine(*argc, argv); - std::string resources_dir = absl::GetFlag(FLAGS_resources_dir); - if (!resources_dir.empty()) - test::internal::OverrideResourcesDir(resources_dir); + // Make sure we always pull in the --resources_dir flag, even if the test + // binary doesn't link with fileutils (downstream expects all test mains to + // have this flag). + (void)absl::GetFlag(FLAGS_resources_dir); // Default to LS_INFO, even for release builds to provide better test // logging. @@ -130,13 +129,6 @@ class TestMainImpl : public TestMain { rtc::tracing::StartInternalCapture(trace_event_path.c_str()); } - // TODO(bugs.webrtc.org/9792): we need to reference something from - // fileutils.h so that our downstream hack where we replace fileutils.cc - // works. Otherwise the downstream flag implementation will take over and - // botch the flag introduced by the hack. Remove this awful thing once the - // downstream implementation has been eliminated. - (void)webrtc::test::JoinFilename("horrible", "hack"); - // InitFieldTrialsFromString stores the char*, so the char array must // outlive the application. field_trials_ = absl::GetFlag(FLAGS_force_fieldtrials); diff --git a/test/testsupport/file_utils_override.cc b/test/testsupport/file_utils_override.cc index 3106d0fe0e..09806913a5 100644 --- a/test/testsupport/file_utils_override.cc +++ b/test/testsupport/file_utils_override.cc @@ -150,12 +150,6 @@ std::string ResourcePath(const std::string& name, #endif } -void OverrideResourcesDir(const std::string& resources_dir) { - RTC_CHECK(false) - << "Setting the resource dir is not supported in open-source " - "tests."; -} - } // namespace internal } // namespace test } // namespace webrtc diff --git a/test/testsupport/file_utils_override.h b/test/testsupport/file_utils_override.h index 235c83994b..8b8484ded1 100644 --- a/test/testsupport/file_utils_override.h +++ b/test/testsupport/file_utils_override.h @@ -48,15 +48,6 @@ std::string WorkingDir(); // extension - File extension, without the dot, i.e. "bmp" or "yuv". std::string ResourcePath(const std::string& name, const std::string& extension); -// Overrides the root resource dir. See ResourcePath for more information. -// -// This is not necessary in most cases, but it can be if we're running on -// phones and copy over resources to some custom location. -// -// Arguments: -// resources_dir - Where resources are located. -void OverrideResourcesDir(const std::string& resources_dir); - } // namespace internal } // namespace test } // namespace webrtc