blob: 856666816dff1659d2f681a62807f477278c3e91 [file] [log] [blame]
#!/usr/bin/env python
# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
"""Generates a command-line for Useful for manual coverage runs.
Before running the generated command line, do this:
gn gen out/coverage --args='use_clang_coverage=true is_component_build=false'
import sys
def main():
cmd = ([sys.executable, 'tools/code_coverage/'] + TESTS +
['-b out/coverage', '-o out/report'] +
['-i=\'.*/out/.*|.*/third_party/.*|.*test.*\''] +
['-c \'out/coverage/%s\'' % t for t in TESTS])
def WithXvfb(binary):
return '-c \'%s testing/ %s\'' % (sys.executable, binary)
modules_unittests = 'out/coverage/modules_unittests'
cmd[cmd.index('-c \'%s\'' % modules_unittests)] = WithXvfb(modules_unittests)
print ' '.join(cmd)
return 0
if __name__ == '__main__':