diff options
author | Ahmad Sharif <asharif@chromium.org> | 2012-02-02 16:37:18 -0800 |
---|---|---|
committer | Ahmad Sharif <asharif@chromium.org> | 2012-02-02 16:37:18 -0800 |
commit | 0dcbc4b1714260820fd4b8d6536fbb05e139cc0f (patch) | |
tree | f8e4825ddcfc2a51f77a504dc371bc67d55fcd8f /crosperf/crosperf_test.py | |
parent | 70de27bdb5a05716befea67cdf72a87714fcc0da (diff) | |
download | toolchain-utils-0dcbc4b1714260820fd4b8d6536fbb05e139cc0f.tar.gz |
Synced repos to: 58208
Diffstat (limited to 'crosperf/crosperf_test.py')
-rwxr-xr-x | crosperf/crosperf_test.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/crosperf/crosperf_test.py b/crosperf/crosperf_test.py new file mode 100755 index 00000000..0c50e7b5 --- /dev/null +++ b/crosperf/crosperf_test.py @@ -0,0 +1,40 @@ +#!/usr/bin/python + +# Copyright 2011 Google Inc. All Rights Reserved. + +import os +import tempfile +import unittest +import crosperf +from utils.file_utils import FileUtils + + +EXPERIMENT_FILE_1 = """ + board: x86-alex + remote: chromeos-alex3 + + benchmark: PageCycler { + iterations: 3 + } + + image1 { + chromeos_image: /usr/local/google/cros_image1.bin + } + + image2 { + chromeos_image: /usr/local/google/cros_image2.bin + } + """ + + +class CrosPerfTest(unittest.TestCase): + def testDryRun(self): + filehandle, filename = tempfile.mkstemp() + os.write(filehandle, EXPERIMENT_FILE_1) + crosperf.Main(["", filename, "--dry_run"]) + os.remove(filename) + + +if __name__ == "__main__": + FileUtils.Configure(True) + unittest.main() |