From 0aa04f9f241a79a82d4ac78841ecb589450d4b01 Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Fri, 28 Mar 2014 13:14:00 +0000 Subject: [PATCH] Restore support for code coverage in WebRTC In https://codereview.chromium.org/68193002 Chromium dropped the support for the coverage=1 flag. This restores it for WebRTC purposes for the Linux platform. TEST=Manually ran the coverage steps on my machine, verified that .gcno files are generated. BUG= R=phoglund@webrtc.org Review URL: https://webrtc-codereview.appspot.com/10879004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5806 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/build/common.gypi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi index 9e4a305ccc..9ce59eedca 100644 --- a/webrtc/build/common.gypi +++ b/webrtc/build/common.gypi @@ -63,6 +63,9 @@ # third party code will still have the reduced warning settings. 'chromium_code': 1, + # Set to 1 to enable code coverage on Linux using the gcov library. + 'coverage%': 0, + # Remote bitrate estimator logging/plotting. 'enable_bwe_test_logging%': 0, @@ -261,6 +264,11 @@ }], ], }], + ['coverage==1 and OS=="linux"', { + 'cflags': [ '-ftest-coverage', + '-fprofile-arcs' ], + 'link_settings': { 'libraries': [ '-lgcov' ] }, + }], ['os_posix==1', { # For access to standard POSIXish features, use WEBRTC_POSIX instead of # a more specific macro.