blob: 085efafee55ef7fe93f03a2a9d0478dac0df9939 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/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()
|