| 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 = 30 | 11 WARMUP_TIME = 30 |
| 12 SLEEP_DURATION = 90 | 12 SLEEP_DURATION = 90 |
| 13 | 13 |
| 14 class realtimecomm_GTalkAudioPlayground(test.test): | 14 class realtimecomm_GTalkAudioPlayground(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 if not os.path.exists('/tmp/tmp.log'): | 24 if not os.path.exists('/tmp/tmp.log'): |
| 25 raise error.TestFail('GTalk log file not exist!') | 25 raise error.TestFail('GTalk log file not exist!') |
| 26 content = utils.read_file('/tmp/tmp.log') | 26 content = utils.read_file('/tmp/tmp.log') |
| 27 if not "voice state, recv=1 send=1" in content: | 27 if not "voice state, recv=1 send=1" in content: |
| 28 raise error.TestFail('Error in Audio send/recv!') | 28 raise error.TestFail('Error in Audio send/recv!') |
| 29 | 29 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 # Verify log | 81 # Verify log |
| 82 try: | 82 try: |
| 83 self.run_verification() | 83 self.run_verification() |
| 84 finally: | 84 finally: |
| 85 pgutil.cleanup_playground(self.playground, True) | 85 pgutil.cleanup_playground(self.playground, True) |
| 86 | 86 |
| 87 # Report perf | 87 # Report perf |
| 88 self.write_perf_keyval(self.performance_results) | 88 self.write_perf_keyval(self.performance_results) |
| 89 | 89 |
| 90 session.close() | 90 session.close() |
| OLD | NEW |