diff options
Diffstat (limited to 'crosperf/benchmark_run_unittest.py')
-rwxr-xr-x | crosperf/benchmark_run_unittest.py | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/crosperf/benchmark_run_unittest.py b/crosperf/benchmark_run_unittest.py index c4c3fdf1..c4670c9c 100755 --- a/crosperf/benchmark_run_unittest.py +++ b/crosperf/benchmark_run_unittest.py @@ -1,38 +1,42 @@ #!/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. +# Copyright 2011 Google Inc. All Rights Reserved. + +"""Testing of benchmark_run.""" import unittest + +from utils import logger + from autotest_runner import MockAutotestRunner -from benchmark_run import BenchmarkRun +from benchmark_run import MockBenchmarkRun +from label import MockLabel +from benchmark import Benchmark from machine_manager import MockMachineManager from results_cache import MockResultsCache -from utils import logger class BenchmarkRunTest(unittest.TestCase): def testDryRun(self): - m = MockMachineManager() + my_label = MockLabel("test1", "image1", "/tmp/test_benchmark_run", + "x86-alex", "chromeos-alex1", "") + m = MockMachineManager("/tmp/chromeos_root") 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()) + bench = Benchmark("PageCyler", + "Pyautoperf", + "", + 1, + 0.2, + "") + b = MockBenchmarkRun("test run", + bench, + my_label, + 1, + [], + m, + logger.GetLogger()) + b.cache = MockResultsCache() + b.autotest_runner = MockAutotestRunner() b.start() |