aboutsummaryrefslogtreecommitdiff
path: root/crosperf/crosperf_test.py
diff options
context:
space:
mode:
authorAhmad Sharif <asharif@chromium.org>2012-02-02 16:37:18 -0800
committerAhmad Sharif <asharif@chromium.org>2012-02-02 16:37:18 -0800
commit0dcbc4b1714260820fd4b8d6536fbb05e139cc0f (patch)
treef8e4825ddcfc2a51f77a504dc371bc67d55fcd8f /crosperf/crosperf_test.py
parent70de27bdb5a05716befea67cdf72a87714fcc0da (diff)
downloadtoolchain-utils-0dcbc4b1714260820fd4b8d6536fbb05e139cc0f.tar.gz
Synced repos to: 58208
Diffstat (limited to 'crosperf/crosperf_test.py')
-rwxr-xr-xcrosperf/crosperf_test.py40
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()