Example #1
0
 def test_main(self):
   self.mock(cq_stats, 'output', self.print_mock)
   self.mock(cq_stats, 'parse_args', lambda: Args(
       project='chromium', log_level=logging.CRITICAL, logs_black_list=None,
       logs_directory=tempfile.gettempdir()))
   self.mock(cq_stats, 'acquire_stats', lambda _: cq_stats.default_stats())
   cq_stats.main()
   return self.expectations
Example #2
0
 def test_main(self):
     self.mock(cq_stats, 'output', self.print_mock)
     self.mock(
         cq_stats, 'parse_args',
         lambda: Args(project='chromium',
                      log_level=logging.CRITICAL,
                      logs_black_list=None,
                      logs_directory=tempfile.gettempdir()))
     self.mock(cq_stats, 'acquire_stats',
               lambda _: cq_stats.default_stats())
     cq_stats.main()
     return self.expectations
Example #3
0
#!/usr/bin/env python
# Copyright 2015 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.

import sys

from infra.tools.cq_stats import cq_stats


if __name__ == '__main__':
  sys.exit(cq_stats.main())