Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Side by Side Diff: slave/skia_slave_scripts/utils/gs_utils_test.py

Issue 344183004: Use new common utils where possible. (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « slave/skia_slave_scripts/utils/gs_utils.py ('k') | slave/skia_slave_scripts/utils/misc.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Tests for module gs_utils.""" 6 """Tests for module gs_utils."""
7 7
8 import __builtin__ 8 import __builtin__
9 import misc
10 import os 9 import os
11 import posixpath 10 import posixpath
12 import shell_utils
13 import shutil 11 import shutil
14 import sys 12 import sys
15 import tempfile 13 import tempfile
16 import time 14 import time
17 15
18 # Appending to PYTHONPATH to find common. 16 # Appending to PYTHONPATH to find common.
19 sys.path.append(os.path.join(misc.BUILDBOT_PATH, 'third_party', 17 BUILDBOT_PATH = os.path.realpath(os.path.join(
20 'chromium_buildbot', 'scripts')) 18 os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir, os.pardir)
21 sys.path.append(os.path.join(misc.BUILDBOT_PATH, 'third_party', 19 )
22 'chromium_buildbot', 'scripts', 'common')) 20 sys.path.append(os.path.join(BUILDBOT_PATH, 'common'))
23 sys.path.append(os.path.join(misc.BUILDBOT_PATH, 'third_party', 21 sys.path.append(os.path.join(BUILDBOT_PATH, 'third_party', 'chromium_buildbot',
24 'chromium_buildbot', 'site_config')) 22 'scripts'))
25 sys.path.append(os.path.join(misc.BUILDBOT_PATH, 'third_party', 23 sys.path.append(os.path.join(BUILDBOT_PATH, 'third_party', 'chromium_buildbot',
26 'chromium_buildbot', 'third_party', 24 'scripts', 'common'))
27 'twisted_10_2')) 25 sys.path.append(os.path.join(BUILDBOT_PATH, 'third_party', 'chromium_buildbot',
26 'site_config'))
27 sys.path.append(os.path.join(BUILDBOT_PATH, 'third_party', 'chromium_buildbot',
28 'third_party', 'twisted_10_2'))
28 29
29 30 from py.utils import shell_utils
30 from slave import slave_utils 31 from slave import slave_utils
31 import gs_utils 32 import gs_utils
32 import unittest 33 import unittest
33 34
34 35
35 GSUTIL_LOCATION = slave_utils.GSUtilSetup() 36 GSUTIL_LOCATION = slave_utils.GSUtilSetup()
36 37
37 TEST_TIMESTAMP = '1354128965' 38 TEST_TIMESTAMP = '1354128965'
38 TEST_TIMESTAMP_2 = '1354128985' 39 TEST_TIMESTAMP_2 = '1354128985'
39 40
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 # pylint: disable=W0212 216 # pylint: disable=W0212
216 self.assertFalse( 217 self.assertFalse(
217 gs_utils._are_timestamps_equal( 218 gs_utils._are_timestamps_equal(
218 local_dir=local_dir, 219 local_dir=local_dir,
219 gs_base=self._test_gs_base, 220 gs_base=self._test_gs_base,
220 gs_relative_dir=self._test_destdir)) 221 gs_relative_dir=self._test_destdir))
221 222
222 223
223 if __name__ == '__main__': 224 if __name__ == '__main__':
224 unittest.main() 225 unittest.main()
OLDNEW
« no previous file with comments | « slave/skia_slave_scripts/utils/gs_utils.py ('k') | slave/skia_slave_scripts/utils/misc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698