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

Unified Diff: chrome/test/logging/win/test_log_collector.h

Issue 9584017: New test infrastructure for producing verbose logs in failing tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved logging_win to logging/win so regular filename_rules work Created 8 years, 9 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 | « chrome/test/logging/win/mof_data_parser_unittest.cc ('k') | chrome/test/logging/win/test_log_collector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/logging/win/test_log_collector.h
diff --git a/chrome/test/logging/win/test_log_collector.h b/chrome/test/logging/win/test_log_collector.h
new file mode 100644
index 0000000000000000000000000000000000000000..d6c2a7d146b20cc284f5f2fa76836a6e307b6cad
--- /dev/null
+++ b/chrome/test/logging/win/test_log_collector.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// The test log collector uses Event Tracing for Windows to collect all LOG()
+// events at all levels (including all VLOG levels) from Chrome, Chrome Frame,
+// and the test executable itself for each test into a temporary log file. At
+// the conclusion of each test, the contents of the log file are regurgitated to
+// stderr iff the test failed. In any case, the log file is promptly deleted.
+//
+// Test executables that wish to benefit from the collector's features (to
+// produce verbose logs on test failure to aid in diagnosing flaky and/or
+// failing tests, for example) must install the collector via
+// |InstallTestLogCollector| before running tests (via RUN_ALL_TESTS(),
+// TestSuite::Run(), etc).
+
+#ifndef CHROME_TEST_LOGGING_WIN_TEST_LOG_COLLECTOR_H_
+#define CHROME_TEST_LOGGING_WIN_TEST_LOG_COLLECTOR_H_
+#pragma once
+
+namespace testing {
+class UnitTest;
+}
+
+namespace logging_win {
+
+// Installs the test log collector into |unit_test| for its lifetime.
+// (Use testing::UnitTest::GetInstance() to get the process-wide unit test
+// instance.)
+void InstallTestLogCollector(testing::UnitTest* unit_test);
+
+} // namespace logging_win
+
+#endif // CHROME_TEST_LOGGING_WIN_TEST_LOG_COLLECTOR_H_
« no previous file with comments | « chrome/test/logging/win/mof_data_parser_unittest.cc ('k') | chrome/test/logging/win/test_log_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698