Пример #1
0
 def setUp(self):
     self.options = options_for_unittests.GetRunOptions(
         output_dir=tempfile.mkdtemp(),
         benchmark_cls=FakeBenchmark,
         fake_browser=True)
     self.options.browser_options.platform = fakes.FakeLinuxPlatform()
     self.benchmark = FakeBenchmark()
Пример #2
0
 def setUpClass(cls):
     finder_options = fakes.CreateBrowserFinderOptions()
     finder_options.browser_options.platform = fakes.FakeLinuxPlatform()
     finder_options.output_formats = ['none']
     finder_options.suppress_gtest_report = True
     finder_options.output_dir = None
     finder_options.upload_bucket = 'public'
     finder_options.upload_results = False
     cls._finder_options = finder_options
     cls.platform = None
     cls.browser = None
     cls.StartBrowser(cls._finder_options)
Пример #3
0
 def SetUpProcess(cls):
     cls._fake_browser_options = fakes.CreateBrowserFinderOptions(
         execute_after_browser_creation=cls.CrashAfterStart)
     cls._fake_browser_options.browser_options.platform = \
         fakes.FakeLinuxPlatform()
     cls._fake_browser_options.output_formats = ['none']
     cls._fake_browser_options.suppress_gtest_report = True
     cls._fake_browser_options.output_dir = None
     cls._fake_browser_options.upload_bucket = 'public'
     cls._fake_browser_options.upload_results = False
     cls._finder_options = cls._fake_browser_options
     cls.platform = None
     cls.browser = None
     cls.SetBrowserOptions(cls._finder_options)
     cls.StartBrowser()
Пример #4
0
 def setupBenchmark(self):  # pylint: disable=invalid-name
     finder_options = fakes.CreateBrowserFinderOptions()
     finder_options.browser_options.platform = fakes.FakeLinuxPlatform()
     finder_options.output_formats = ['none']
     finder_options.suppress_gtest_report = True
     finder_options.output_dir = None
     finder_options.upload_bucket = 'public'
     finder_options.upload_results = False
     benchmarkclass = FakeBenchmark
     parser = finder_options.CreateParser()
     benchmark_module.AddCommandLineArgs(parser)
     benchmarkclass.AddCommandLineArgs(parser)
     options, _ = parser.parse_args([])
     benchmark_module.ProcessCommandLineArgs(parser, options)
     benchmarkclass.ProcessCommandLineArgs(parser, options)
     benchmark = benchmarkclass()
     return benchmark, finder_options
Пример #5
0
 def setupTest(self):
     finder_options = fakes.CreateBrowserFinderOptions()
     finder_options.browser_options.platform = fakes.FakeLinuxPlatform()
     finder_options.output_formats = ['none']
     finder_options.suppress_gtest_report = True
     finder_options.output_dir = None
     finder_options.upload_bucket = 'public'
     finder_options.upload_results = False
     testclass = FakeTest
     parser = finder_options.CreateParser()
     benchmark.AddCommandLineArgs(parser)
     testclass.AddCommandLineArgs(parser)
     options, dummy_args = parser.parse_args([])
     benchmark.ProcessCommandLineArgs(parser, options)
     testclass.ProcessCommandLineArgs(parser, options)
     test = testclass()
     return test, finder_options