OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import os, re, shutil, sys, time | 5 import os, re, shutil, sys, time |
6 | 6 |
7 from autotest_lib.client.bin import test, utils | 7 from autotest_lib.client.bin import test, utils |
8 from autotest_lib.client.common_lib import error | 8 from autotest_lib.client.common_lib import error |
9 from autotest_lib.client.cros import cros_ui | 9 from autotest_lib.client.cros import cros_ui |
10 | 10 |
11 WARMUP_TIME = 60 | 11 WARMUP_TIME = 60 |
12 SLEEP_DURATION = 260 | 12 SLEEP_DURATION = 260 |
13 | 13 |
14 class realtimecomm_GTalkPlayground(test.test): | 14 class realtimecomm_GTalkPlayground(test.test): |
15 version = 1 | 15 version = 1 |
16 playground = '/home/autotest/playground' | |
17 dep = 'realtimecomm_playground' | 16 dep = 'realtimecomm_playground' |
18 | 17 |
19 def setup(self): | 18 def setup(self): |
| 19 self.playground = os.path.join(self.autodir, 'playground') |
20 self.job.setup_dep([self.dep]) | 20 self.job.setup_dep([self.dep]) |
21 | 21 |
22 | 22 |
23 def run_verification(self): | 23 def run_verification(self): |
24 # TODO(zhurun): Add more checking and perf data collection. | 24 # TODO(zhurun): Add more checking and perf data collection. |
25 if not os.path.exists('/tmp/tmp.log'): | 25 if not os.path.exists('/tmp/tmp.log'): |
26 raise error.TestFail('GTalk log file not exist!') | 26 raise error.TestFail('GTalk log file not exist!') |
27 content = utils.read_file('/tmp/tmp.log') | 27 content = utils.read_file('/tmp/tmp.log') |
28 if not "Found V4L2 capture" in content: | 28 if not "Found V4L2 capture" in content: |
29 raise error.TestFail('V4L2 not found!') | 29 raise error.TestFail('V4L2 not found!') |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 # Verify log | 125 # Verify log |
126 try: | 126 try: |
127 self.run_verification() | 127 self.run_verification() |
128 finally: | 128 finally: |
129 pgutil.cleanup_playground(self.playground, True) | 129 pgutil.cleanup_playground(self.playground, True) |
130 | 130 |
131 # Report perf | 131 # Report perf |
132 self.write_perf_keyval(self.performance_results) | 132 self.write_perf_keyval(self.performance_results) |
133 | 133 |
134 session.close() | 134 session.close() |
OLD | NEW |