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

Side by Side Diff: slave/skia_slave_scripts/download_skps.py

Issue 648353002: Remove Skia's forked buildbot code (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Address comment Created 6 years, 2 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
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """ Download the SKPs. """
7
8 from build_step import BuildStep
9 from utils import old_gs_utils as gs_utils
10 from utils import sync_bucket_subdir
11 import os
12 import posixpath
13 import sys
14
15
16 class DownloadSKPs(BuildStep):
17 def __init__(self, timeout=12800, no_output_timeout=9600, **kwargs):
18 super (DownloadSKPs, self).__init__(
19 timeout=timeout,
20 no_output_timeout=no_output_timeout,
21 **kwargs)
22
23 def _Run(self):
24 dest_gsbase = (self._args.get('dest_gsbase') or
25 sync_bucket_subdir.DEFAULT_PERFDATA_GS_BASE)
26 version_file = 'SKP_VERSION'
27 expected_skp_version = None
28 with open(version_file) as f:
29 expected_skp_version = f.read().rstrip()
30 actual_skp_version = None
31 actual_version_file = os.path.join(
32 self._local_playback_dirs.PlaybackSkpDir(), version_file)
33 if os.path.isfile(actual_version_file):
34 with open(actual_version_file) as f:
35 actual_skp_version = f.read().rstrip()
36 if actual_skp_version != expected_skp_version:
37 self._flavor_utils.CreateCleanHostDirectory(
38 self._local_playback_dirs.PlaybackSkpDir())
39 gs_relative_dir = (
40 self._storage_playback_dirs.PlaybackSkpDir(expected_skp_version))
41 print '\n\n========Downloading skp files from Google Storage========\n\n'
42 gs_utils.download_dir_contents(
43 remote_src_dir=posixpath.join(dest_gsbase, gs_relative_dir),
44 local_dest_dir=self._local_playback_dirs.PlaybackRootDir(),
45 multi=False)
46 with open(actual_version_file, 'w') as f:
47 f.write(expected_skp_version)
48
49
50 if '__main__' == __name__:
51 sys.exit(BuildStep.RunBuildStep(DownloadSKPs))
OLDNEW
« no previous file with comments | « slave/skia_slave_scripts/download_skimage_files.py ('k') | slave/skia_slave_scripts/flavor_utils/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698