| OLD | NEW | 
|    1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |    1 # Copyright (c) 2012 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 """Utility class to build the Skia master BuildFactory's for HouseKeeping bots. |    5 """Utility class to build the Skia master BuildFactory's for HouseKeeping bots. | 
|    6  |    6  | 
|    7 Overrides SkiaFactory with Per-commit HouseKeeping steps.""" |    7 Overrides SkiaFactory with Per-commit HouseKeeping steps.""" | 
|    8  |    8  | 
|    9 import os |    9 import os | 
|   10 import tempfile |   10 import tempfile | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   42     self._skia_cmd_obj.AddRunCommand( |   42     self._skia_cmd_obj.AddRunCommand( | 
|   43         command=self.TargetPathJoin('gm', 'tests', 'run.sh'), |   43         command=self.TargetPathJoin('gm', 'tests', 'run.sh'), | 
|   44         description='RunGmSelfTests') |   44         description='RunGmSelfTests') | 
|   45  |   45  | 
|   46     # Compile using clang. |   46     # Compile using clang. | 
|   47     self._skia_cmd_obj.AddRunCommand( |   47     self._skia_cmd_obj.AddRunCommand( | 
|   48         command=('GYP_DEFINES=skia_warnings_as_errors=1 CXX=`which clang++` ' |   48         command=('GYP_DEFINES=skia_warnings_as_errors=1 CXX=`which clang++` ' | 
|   49                  'CC=`which clang` make -j30'), |   49                  'CC=`which clang` make -j30'), | 
|   50         description='ClangCompile') |   50         description='ClangCompile') | 
|   51  |   51  | 
|   52     # Generate and upload Buildbot Pydoc documentation. |   52     if not self._do_patch_step:  # Do not run Pydoc & Doxygen steps if try job. | 
|   53     buildbot_pydoc_actual_svn_baseurl = '%s/%s' % (AUTOGEN_SVN_BASEURL, |   53       # Generate and upload Buildbot Pydoc documentation. | 
|   54                                                    'buildbot-docs') |   54       buildbot_pydoc_actual_svn_baseurl = '%s/%s' % (AUTOGEN_SVN_BASEURL, | 
|   55     # pylint: disable=W0212 |   55                                                      'buildbot-docs') | 
|   56     update_buildbot_pydoc_path = self.TargetPathJoin( |   56       # pylint: disable=W0212 | 
|   57         self._skia_cmd_obj._local_slave_script_dir, 'update-buildbot-pydoc.sh') |   57       update_buildbot_pydoc_path = self.TargetPathJoin( | 
|   58     buildbot_pydoc_working_dir = self.TargetPathJoin( |   58           self._skia_cmd_obj._local_slave_script_dir, | 
|   59         tempfile.gettempdir(), 'buildbot-docs') |   59           'update-buildbot-pydoc.sh') | 
|   60     # Cleanup the previous (if any) buildbot pydoc working dir. |   60       buildbot_pydoc_working_dir = self.TargetPathJoin( | 
|   61     self._skia_cmd_obj.AddRunCommand( |   61           tempfile.gettempdir(), 'buildbot-docs') | 
|   62         command='rm -rf %s' % buildbot_pydoc_working_dir, |   62       # Cleanup the previous (if any) buildbot pydoc working dir. | 
|   63         description='CleanupBuildbotPydoc') |   63       self._skia_cmd_obj.AddRunCommand( | 
|   64     # Generate Buildbot Pydoc documentation. |   64           command='rm -rf %s' % buildbot_pydoc_working_dir, | 
|   65     self._skia_cmd_obj.AddRunCommand( |   65           description='CleanupBuildbotPydoc') | 
|   66         command='BUILDBOT_PYDOC_TEMPDIR=%s bash %s' % ( |   66       # Generate Buildbot Pydoc documentation. | 
|   67             buildbot_pydoc_working_dir, update_buildbot_pydoc_path), |   67       self._skia_cmd_obj.AddRunCommand( | 
|   68         description='UpdateBuildbotPydoc') |   68           command='BUILDBOT_PYDOC_TEMPDIR=%s bash %s' % ( | 
|   69     if self._do_upload_results: |   69               buildbot_pydoc_working_dir, update_buildbot_pydoc_path), | 
|   70       # Upload Buildbot Pydoc. |   70           description='UpdateBuildbotPydoc') | 
|   71       self._skia_cmd_obj.AddMergeIntoSvn( |   71       if self._do_upload_results: | 
|   72           source_dir_path=self.TargetPathJoin( |   72         # Upload Buildbot Pydoc. | 
|   73               buildbot_pydoc_working_dir, 'buildbot-docs'), |   73         self._skia_cmd_obj.AddMergeIntoSvn( | 
|   74           dest_svn_url=buildbot_pydoc_actual_svn_baseurl, |   74             source_dir_path=self.TargetPathJoin( | 
|   75           merge_dir_path=os.path.join(buildbot_pydoc_working_dir, 'merge'), |   75                 buildbot_pydoc_working_dir, 'buildbot-docs'), | 
|   76           svn_username_file=self._autogen_svn_username_file, |   76             dest_svn_url=buildbot_pydoc_actual_svn_baseurl, | 
|   77           svn_password_file=self._autogen_svn_password_file, |   77             merge_dir_path=os.path.join(buildbot_pydoc_working_dir, 'merge'), | 
|   78           commit_message=WithProperties( |   78             svn_username_file=self._autogen_svn_username_file, | 
|   79               'UploadBuildbotPydoc of r%%(%s:-)s on %s' % ( |   79             svn_password_file=self._autogen_svn_password_file, | 
|   80                   'revision', self._builder_name)), |   80             commit_message=WithProperties( | 
|   81           description='UploadBuildbotPydoc') |   81                 'UploadBuildbotPydoc of r%%(%s:-)s on %s' % ( | 
 |   82                     'revision', self._builder_name)), | 
 |   83             description='UploadBuildbotPydoc') | 
|   82  |   84  | 
|   83     # Generate and upload Doxygen documentation. |   85       # Generate and upload Doxygen documentation. | 
|   84     doxygen_actual_svn_baseurl = '%s/%s' % (AUTOGEN_SVN_BASEURL, 'docs') |   86       doxygen_actual_svn_baseurl = '%s/%s' % (AUTOGEN_SVN_BASEURL, 'docs') | 
|   85     update_doxygen_path = self.TargetPathJoin('tools', 'update-doxygen.sh') |   87       update_doxygen_path = self.TargetPathJoin('tools', 'update-doxygen.sh') | 
|   86     doxygen_working_dir = self.TargetPathJoin(tempfile.gettempdir(), 'doxygen') |   88       doxygen_working_dir = self.TargetPathJoin( | 
|   87     # Cleanup the previous (if any) doxygen working dir. |   89           tempfile.gettempdir(), 'doxygen') | 
|   88     self._skia_cmd_obj.AddRunCommand( |   90       # Cleanup the previous (if any) doxygen working dir. | 
|   89         command='rm -rf %s' % doxygen_working_dir, description='CleanupDoxygen') |   91       self._skia_cmd_obj.AddRunCommand( | 
|   90     # Generate Doxygen documentation. |   92           command='rm -rf %s' % doxygen_working_dir, | 
|   91     self._skia_cmd_obj.AddRunCommand( |   93           description='CleanupDoxygen') | 
|   92         command='DOXYGEN_TEMPDIR=%s DOXYGEN_COMMIT=false bash %s' % ( |   94       # Generate Doxygen documentation. | 
|   93             doxygen_working_dir, update_doxygen_path), |   95       self._skia_cmd_obj.AddRunCommand( | 
|   94         description='UpdateDoxygen') |   96           command='DOXYGEN_TEMPDIR=%s DOXYGEN_COMMIT=false bash %s' % ( | 
|   95     if self._do_upload_results: |   97               doxygen_working_dir, update_doxygen_path), | 
|   96       # Upload Doxygen. |   98           description='UpdateDoxygen') | 
|   97       self._skia_cmd_obj.AddMergeIntoSvn( |   99       if self._do_upload_results: | 
|   98           source_dir_path=self.TargetPathJoin( |  100         # Upload Doxygen. | 
|   99               doxygen_working_dir, 'docs'), |  101         self._skia_cmd_obj.AddMergeIntoSvn( | 
|  100           dest_svn_url=doxygen_actual_svn_baseurl, |  102             source_dir_path=self.TargetPathJoin( | 
|  101           merge_dir_path=os.path.join(doxygen_working_dir, 'merge'), |  103                 doxygen_working_dir, 'docs'), | 
|  102           svn_username_file=self._autogen_svn_username_file, |  104             dest_svn_url=doxygen_actual_svn_baseurl, | 
|  103           svn_password_file=self._autogen_svn_password_file, |  105             merge_dir_path=os.path.join(doxygen_working_dir, 'merge'), | 
|  104           commit_message=WithProperties( |  106             svn_username_file=self._autogen_svn_username_file, | 
|  105               'UploadDoxygen of r%%(%s:-)s on %s' % ( |  107             svn_password_file=self._autogen_svn_password_file, | 
|  106                   'revision', self._builder_name)), |  108             commit_message=WithProperties( | 
|  107           description='UploadDoxygen') |  109                 'UploadDoxygen of r%%(%s:-)s on %s' % ( | 
 |  110                     'revision', self._builder_name)), | 
 |  111             description='UploadDoxygen') | 
|  108  |  112  | 
|  109     return self |  113     return self | 
| OLD | NEW |