Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(841)

Unified Diff: media/base/run_all_unittests.cc

Issue 10808115: Run media_unittests on android test bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove duplicate code to init logging. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/run_tests.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/run_all_unittests.cc
diff --git a/media/base/run_all_unittests.cc b/media/base/run_all_unittests.cc
index 4dc422450c8634f3fd164e28bd3dcb172c81d2d4..e0145bd6229a34c6caa23d50a88b68ec0a1c1bc4 100644
--- a/media/base/run_all_unittests.cc
+++ b/media/base/run_all_unittests.cc
@@ -10,25 +10,18 @@
class TestSuiteNoAtExit : public base::TestSuite {
public:
- TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv, false) {}
+ TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv, true) {}
Ami GONE FROM CHROMIUM 2012/07/25 23:06:01 s/, true// instead?
nilesh 2012/07/26 00:54:02 Done.
virtual ~TestSuiteNoAtExit() {}
+ protected:
+ virtual void Initialize();
};
-int main(int argc, char** argv) {
- // By default command-line parsing happens only in TestSuite::Run(), but
nilesh 2012/07/25 21:56:32 I think this can be removed now. TestSuite ctor ca
- // that's too late to get VLOGs and so on from
- // InitializeMediaLibraryForTesting() below. Instead initialize logging
- // explicitly here (and have it get re-initialized by TestSuite::Run()).
- CommandLine::Init(argc, argv);
- CHECK(logging::InitLogging(
- NULL,
- logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
- logging::DONT_LOCK_LOG_FILE,
- logging::APPEND_TO_OLD_LOG_FILE,
- logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS));
- base::AtExitManager exit_manager;
-
+void TestSuiteNoAtExit::Initialize() {
+ // Run TestSuite::Initialize first so that logging in initialized.
Ami GONE FROM CHROMIUM 2012/07/25 23:06:01 s/in/is/
nilesh 2012/07/26 00:54:02 Done.
+ base::TestSuite::Initialize();
media::InitializeMediaLibraryForTesting();
Ami GONE FROM CHROMIUM 2012/07/25 23:06:01 It's strange-looking that this will be called mult
nilesh 2012/07/26 00:54:02 Maybe I am missing something, but Initialize is ca
Ami GONE FROM CHROMIUM 2012/07/26 04:01:11 I was thinking of gtest's SetUp method, which is c
+}
+int main(int argc, char** argv) {
return TestSuiteNoAtExit(argc, argv).Run();
}
« no previous file with comments | « build/android/run_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698