summaryrefslogtreecommitdiffstats
path: root/testing/coverage_util_ios.cc
diff options
context:
space:
mode:
authoreugenebut@chromium.org <eugenebut@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-10 00:41:02 +0000
committereugenebut@chromium.org <eugenebut@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-10 00:41:02 +0000
commit9b00523e53559b874d1de527131baec833fb5489 (patch)
tree8fa97c71af5a2273c7016052c43479d932b1e276 /testing/coverage_util_ios.cc
parent69e4cb03edb7e8797bb243071256c32a8cae59b3 (diff)
downloadchromium_src-9b00523e53559b874d1de527131baec833fb5489.zip
chromium_src-9b00523e53559b874d1de527131baec833fb5489.tar.gz
chromium_src-9b00523e53559b874d1de527131baec833fb5489.tar.bz2
Flush gcda (code coverage) files manually in iOS Platform Test.
iOS 7 does not call any code at the "end" of an app so flushing should be performed manually. BUG=392265 Review URL: https://codereview.chromium.org/375033002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282195 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'testing/coverage_util_ios.cc')
-rw-r--r--testing/coverage_util_ios.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/coverage_util_ios.cc b/testing/coverage_util_ios.cc
new file mode 100644
index 0000000..15ac1b4
--- /dev/null
+++ b/testing/coverage_util_ios.cc
@@ -0,0 +1,15 @@
+// Copyright 2014 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.
+
+extern "C" void __gcov_flush();
+
+namespace coverage_util {
+
+void FlushCoverageDataIfNecessary() {
+#if defined(ENABLE_TEST_CODE_COVERAGE)
+ __gcov_flush();
+#endif
+}
+
+} // namespace coverage_util