diff options
author | Caroline Tice <cmtice@google.com> | 2015-12-10 12:09:40 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-12-11 03:51:12 +0000 |
commit | 7057cf67ba1dbdd4387f53e5fe47b43c955b1a53 (patch) | |
tree | c4dd4303b356240113781f1e0c71d1628911d7c3 /crosperf/benchmark_run_unittest.py | |
parent | 939274265fbac8c7f3d47c4e36c680d58cd578e9 (diff) | |
download | toolchain-utils-7057cf67ba1dbdd4387f53e5fe47b43c955b1a53.tar.gz |
Crosperf: Fix many broken unittests.
Apparently people have been making changes and not running the
unittests; many of the unittests were suffering from bit-rot. This
CL fixes most of the broken unittests (there are still 3 large ones
being worked on -- that will be in another CL).
BUG=chromium:567883
TEST=Verified that these unittests work now.
Change-Id: I0252a276a035894e70e04c61339cdba148c9bbfd
Reviewed-on: https://chrome-internal-review.googlesource.com/241513
Commit-Ready: Luis Lozano <llozano@chromium.org>
Tested-by: Luis Lozano <llozano@chromium.org>
Reviewed-by: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'crosperf/benchmark_run_unittest.py')
-rwxr-xr-x | crosperf/benchmark_run_unittest.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/crosperf/benchmark_run_unittest.py b/crosperf/benchmark_run_unittest.py index 07c83318..49171185 100755 --- a/crosperf/benchmark_run_unittest.py +++ b/crosperf/benchmark_run_unittest.py @@ -10,7 +10,7 @@ import mock import unittest import inspect -from utils import logger +from cros_utils import logger import benchmark_run @@ -43,8 +43,9 @@ class BenchmarkRunTest(unittest.TestCase): self.test_label = MockLabel("test1", "image1", "/tmp/test_benchmark_run", "x86-alex", "chromeos2-row1-rack4-host9.cros", - image_args="", - cache_dir="", cache_only=False) + image_args="", cache_dir="", cache_only=False, + log_level="average", compiler="gcc") + self.test_cache_conditions = [CacheConditions.CACHE_FILE_EXISTS, CacheConditions.CHECKSUMS_MATCH] @@ -56,15 +57,16 @@ class BenchmarkRunTest(unittest.TestCase): def testDryRun(self): my_label = MockLabel("test1", "image1", "/tmp/test_benchmark_run", "x86-alex", "chromeos2-row1-rack4-host9.cros", - image_args="", - cache_dir="", cache_only=False) + image_args="", cache_dir="", cache_only=False, + log_level="average", compiler="gcc") + logging_level = "average" m = MockMachineManager("/tmp/chromeos_root", 0, logging_level, '') m.AddMachine("chromeos2-row1-rack4-host9.cros") bench = Benchmark("page_cycler.netsim.top_10", # name "page_cycler.netsim.top_10", # test_name "", # test_args - 1, # iteratins + 1, # iterations False, # rm_chroot_tmp "", # perf_args suite="telemetry_Crosperf") # suite @@ -386,7 +388,7 @@ class BenchmarkRunTest(unittest.TestCase): self.assertEqual (mock_result.call_count, 1) mock_result.assert_called_with (self.mock_logger, 'average', - self.test_label, "{'Score':100}", + self.test_label, None, "{'Score':100}", "", 0, False, 'page_cycler.netsim.top_10', 'telemetry_Crosperf') |