aboutsummaryrefslogtreecommitdiff
path: root/crosperf/benchmark_run_unittest.py
blob: c4c3fdf1633dfa9cd19a1a9a792a8dcfc7e50f29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/python

# Copyright (c) 2011 The Chromium OS 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 unittest
from autotest_runner import MockAutotestRunner
from benchmark_run import BenchmarkRun
from machine_manager import MockMachineManager
from results_cache import MockResultsCache
from utils import logger


class BenchmarkRunTest(unittest.TestCase):
  def testDryRun(self):
    m = MockMachineManager()
    m.AddMachine("chromeos-alex1")
    b = BenchmarkRun("test run",
                     "PageCycler",
                     "PageCycler",
                     "",
                     "image1",
                     "/tmp/test",
                     "/tmp/test/image",
                     "x86-alex",
                     1,
                     [],
                     0.2,
                     "",
                     "none",
                     m,
                     MockResultsCache(),
                     MockAutotestRunner(),
                     logger.GetLogger())
    b.start()


if __name__ == "__main__":
  unittest.main()