OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium 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 optparse | 5 import optparse |
6 import os | 6 import os |
7 import platform | 7 import platform |
8 import shutil | 8 import shutil |
9 import subprocess | 9 import subprocess |
10 import sys | 10 import sys |
11 import tempfile | 11 import tempfile |
12 import unittest | 12 import unittest |
13 import zipfile | 13 import zipfile |
14 | 14 |
15 from catapult_base import cloud_storage | 15 from catapult_base import cloud_storage |
16 from telemetry.util import find_dependencies | 16 from telemetry.internal.util import find_dependencies |
17 | 17 |
18 | 18 |
19 class FindDependenciesTest(unittest.TestCase): | 19 class FindDependenciesTest(unittest.TestCase): |
20 @unittest.skipUnless( | 20 @unittest.skipUnless( |
21 cloud_storage.SupportsProdaccess( | 21 cloud_storage.SupportsProdaccess( |
22 os.path.realpath(cloud_storage.FindGsutil())), | 22 os.path.realpath(cloud_storage.FindGsutil())), |
23 'Could not find a depot_tools installation with gsutil.') | 23 'Could not find a depot_tools installation with gsutil.') |
24 def testGsutil(self): | 24 def testGsutil(self): |
25 parser = optparse.OptionParser() | 25 parser = optparse.OptionParser() |
26 find_dependencies.FindDependenciesCommand.AddCommandLineArgs(parser) | 26 find_dependencies.FindDependenciesCommand.AddCommandLineArgs(parser) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #gsutil_process = subprocess.Popen(gsutil_command, stdout=dev_null) | 59 #gsutil_process = subprocess.Popen(gsutil_command, stdout=dev_null) |
60 #try: | 60 #try: |
61 # util.WaitFor(gsutil_process.poll, timeout=0.5) | 61 # util.WaitFor(gsutil_process.poll, timeout=0.5) |
62 # self.assertEqual(gsutil_process.returncode, 0, | 62 # self.assertEqual(gsutil_process.returncode, 0, |
63 # msg='gsutil config failed.') | 63 # msg='gsutil config failed.') |
64 #except exceptions.TimeoutException: | 64 #except exceptions.TimeoutException: |
65 # gsutil_process.terminate() | 65 # gsutil_process.terminate() |
66 # gsutil_process.wait() | 66 # gsutil_process.wait() |
67 finally: | 67 finally: |
68 shutil.rmtree(temp_dir) | 68 shutil.rmtree(temp_dir) |
OLD | NEW |