aboutsummaryrefslogtreecommitdiff
path: root/crosperf/benchmark_run_unittest.py
diff options
context:
space:
mode:
Diffstat (limited to 'crosperf/benchmark_run_unittest.py')
-rwxr-xr-xcrosperf/benchmark_run_unittest.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/crosperf/benchmark_run_unittest.py b/crosperf/benchmark_run_unittest.py
new file mode 100755
index 00000000..a449a33b
--- /dev/null
+++ b/crosperf/benchmark_run_unittest.py
@@ -0,0 +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.
+
+import unittest
+from autotest_runner import MockAutotestRunner
+from benchmark_run import BenchmarkRun
+from machine_manager import MockMachineManager
+from perf_processor import MockPerfProcessor
+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(),
+ MockPerfProcessor(),
+ logger.GetLogger())
+ b.start()
+
+
+if __name__ == "__main__":
+ unittest.main()