You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
838 B
44 lines
838 B
#!/usr/bin/env python2 |
|
|
|
# Copyright 2011 Google Inc. All Rights Reserved. |
|
"""Test for crosperf.""" |
|
|
|
from __future__ import print_function |
|
|
|
import os |
|
import tempfile |
|
import unittest |
|
import crosperf |
|
from cros_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): |
|
"""Class to test Crosperf.""" |
|
|
|
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()
|
|
|