# Output HTML elements and templates.
HTML_HEAD = ('<html><head><title>Skia Bench Expected Ranges</title>'
- '<script type="text/javascript" src="https://skia.googlecode.com/'
- 'svn/buildbot/dygraph-combined.js"></script></head><body>Please '
- 'adjust values as appropriate and update benches to monitor in '
- 'bench/bench_expectations.txt.<br><br>')
+ '<script type="text/javascript" src="https://raw.github.com/google'
+ '/skia-buildbot/master/dygraph-combined.js"></script></head><body>'
+ 'Please adjust values as appropriate and update benches to monitor'
+ ' in bench/bench_expectations.txt.<br><br>')
HTML_SUFFIX = '</body></html>'
GRAPH_PREFIX = ('<br>%s<br><div id="%s" style="width:400px;height:200px"></div>'
'<script type="text/javascript">g%s=new Dygraph('
<!-- TODO(epoger): Can we get the base URLs (commondatastorage and
issues list) from
- http://skia.googlecode.com/svn/buildbot/site_config/global_variables.json ?
+ https://skia.googlesource.com/buildbot/+/master/site_config/global_variables.json ?
I tried importing the
http://skia.googlecode.com/svn/buildbot/skia_tools.js script and using
that to do so, but I got Access-Control-Allow-Origin errors.
<!-- TODO(epoger): Can we get the base URLs (commondatastorage and
issues list) from
- http://skia.googlecode.com/svn/buildbot/site_config/global_variables.json
- ? I tried importing the
+ https://skia.googlesource.com/buildbot/+/master/site_config/global_variables.json ?
+ I tried importing the
http://skia.googlecode.com/svn/buildbot/skia_tools.js script and using
that to do so, but I got Access-Control-Allow-Origin errors.
-->
# and then run "gclient sync".
solutions = [
{
- "name" : "trunk",
- "url" : "https://skia.googlecode.com/svn/trunk",
+ "name" : "skia",
+ "url" : "https://skia.googlesource.com/skia.git",
},
]
target_os = ["android"]
+++ /dev/null
-# To develop Skia targeting NaCl,
-# copy this file to your root development directory as ".gclient"
-# and then run "gclient sync".
-solutions = [
- {
- "name" : "nacl",
- "url" : "https://skia.googlecode.com/svn/nacl",
- },
- {
- "name" : "trunk",
- "url" : "https://skia.googlecode.com/svn/trunk",
- },
-]
+++ /dev/null
-#!/bin/bash
-#
-# Author: Ravi Mistry
-#
-# Script to checkout and build a fresh copy of Chromium from head that uses a
-# writable, tip-of-tree Skia rather than the read-only, revision-locked Skia
-# specified in http://src.chromium.org/viewvc/chrome/trunk/src/DEPS
-#
-# Sample Usage:
-# tools/build-tot-chromium.sh ~/chromiumtrunk
-
-if [[ $# -ne 1 ]] ; then
- echo "usage: $0 chromium_location"
- exit 1
-fi
-CHROMIUM_LOCATION=$1
-
-echo -e "\n\n========Deleting $CHROMIUM_LOCATION========\n\n"
-rm -rf $CHROMIUM_LOCATION
-
-mkdir $CHROMIUM_LOCATION
-cd $CHROMIUM_LOCATION
-gclient config https://src.chromium.org/chrome/trunk/src
-echo '
-solutions = [
- { "name" : "src",
- "url" : "https://src.chromium.org/chrome/trunk/src",
- "deps_file" : "DEPS",
- "managed" : True,
- "custom_deps" : {
- "src/third_party/skia": "https://skia.googlecode.com/svn/trunk",
- "src/third_party/skia/gyp": None,
- "src/third_party/skia/src": None,
- "src/third_party/skia/include": None,
- },
- "safesync_url": "http://chromium-status.appspot.com/lkgr",
- },
-]
-' > .gclient
-
-echo -e "\n\n========Starting gclient sync========\n\n"
-START_TIME=$SECONDS
-gclient sync
-END_TIME=$SECONDS
-echo -e "\n\n========gclient sync took $((END_TIME - START_TIME)) seconds========\n\n"
-
-cd src
-rm -rf out/Debug out/Release
-GYP_GENERATORS='ninja' ./build/gyp_chromium
-
-echo -e "\n\n========Starting ninja build========\n\n"
-START_TIME=$SECONDS
-ninja -C out/Release chrome
-END_TIME=$SECONDS
-echo -e "\n\n========ninja build took $((END_TIME - START_TIME)) seconds========\n\n"
-
-SVN_VERSION=`svnversion .`
-echo -e "\n\n========The Chromium & Skia versions are $SVN_VERSION========\n\n"
-
Provides read access to buildbot's global_variables.json .
"""
+
+from contextlib import closing
+
+import HTMLParser
import json
import svn
+import sys
+import urllib2
+
_global_vars = None
-GLOBAL_VARS_JSON_URL = (
- 'http://skia.googlecode.com/svn/buildbot/site_config/global_variables.json')
+GLOBAL_VARS_JSON_URL = ('https://skia.googlesource.com/buildbot/+'
+ '/master/site_config/global_variables.json')
class GlobalVarsRetrievalError(Exception):
pass
+def retrieve_from_googlesource(url):
+ """Retrieve the given file from GoogleSource's HTTP interface, trimming the
+ extraneous HTML. Intended to be a GoogleSource equivalent of "svn cat".
+
+ This just returns the unescaped contents of the first <pre> tag which matches
+ our expectations for GoogleSource's HTTP interface. If that interface changes,
+ this function will almost surely break.
+
+ Args:
+ url: string; the URL of the file to retrieve.
+ Returns:
+ The contents of the file in GoogleSource, stripped of the extra HTML from
+ the HTML interface.
+ """
+ with closing(urllib2.urlopen(url)) as f:
+ contents = f.read()
+ pre_open = '<pre class="git-blob prettyprint linenums lang-json">'
+ pre_close = '</pre>'
+ start_index = contents.find(pre_open)
+ end_index = contents.find(pre_close)
+ parser = HTMLParser.HTMLParser()
+ return parser.unescape(contents[start_index + len(pre_open):end_index])
+
+
def Get(var_name):
- '''Return the value associated with this name in global_variables.json.
- Raises NoSuchGlobalVariable if there is no variable with that name.'''
+ """Return the value associated with this name in global_variables.json.
+
+ Args:
+ var_name: string; the variable to look up.
+ Returns:
+ The value of the variable.
+ Raises:
+ NoSuchGlobalVariable if there is no variable with that name.
+ """
global _global_vars
if not _global_vars:
try:
- global_vars_text = svn.Cat(GLOBAL_VARS_JSON_URL)
+ global_vars_text = retrieve_from_googlesource(GLOBAL_VARS_JSON_URL)
except Exception:
raise GlobalVarsRetrievalError('Failed to retrieve %s.' %
GLOBAL_VARS_JSON_URL)
return _global_vars[var_name]['value']
except KeyError:
raise NoSuchGlobalVariable(var_name)
+
+
+if __name__ == '__main__':
+ print Get(sys.argv[1])
# All try builders have this suffix.
TRYBOT_SUFFIX = '-Trybot'
-# Location of the codereview.settings file in the Skia repo.
-SKIA_URL = 'skia.googlecode.com'
-CODEREVIEW_SETTINGS = '/svn/codereview.settings'
-
# String for matching the svn url of the try server inside codereview.settings.
TRYSERVER_SVN_URL = 'TRYSERVER_SVN_URL: '
def GetTryRepo():
- """ Determine the TRYSERVER_SVN_URL from the codereview.settings file in the
- Skia repo. """
- connection = httplib.HTTPConnection(SKIA_URL)
- connection.request('GET', CODEREVIEW_SETTINGS)
- content = connection.getresponse().read()
- for line in content.split('\n'):
- if line.startswith(TRYSERVER_SVN_URL):
- return line[len(TRYSERVER_SVN_URL):].rstrip()
+ """Determine the TRYSERVER_SVN_URL from the codereview.settings file."""
+ codereview_settings_file = os.path.join(os.path.dirname(__file__), os.pardir,
+ 'codereview.settings')
+ with open(codereview_settings_file) as f:
+ for line in f:
+ if line.startswith(TRYSERVER_SVN_URL):
+ return line[len(TRYSERVER_SVN_URL):].rstrip()
raise Exception('Couldn\'t determine the TRYSERVER_SVN_URL. Make sure it is '
- 'defined in the %s file.' % CODEREVIEW_SETTINGS)
+ 'defined in the %s file.' % codereview_settings_file)
def RetrieveTrybotList(json_filename):
mkdir -p $DOXYGEN_TEMPDIR
cd $DOXYGEN_TEMPDIR
-if [ -d "trunk" ]; then
- svn update --accept theirs-full trunk
+if [ -d "skia" ]; then
+ pushd skia
+ git pull
+ git checkout origin/master
+ popd
else
- svn checkout http://skia.googlecode.com/svn/trunk # read-only
+ git clone https://skia.googlesource.com/skia.git
fi
if [ -d "docs" ]; then
svn update --accept theirs-full docs
fi
if [ ! -f "docs/static_footer.txt" ]; then
- cp trunk/tools/doxygen_footer.txt docs/static_footer.txt
+ cp skia/tools/doxygen_footer.txt docs/static_footer.txt
fi
# Run Doxygen.
-cd trunk
+cd skia
doxygen Doxyfile
ret_code=$?
if [ $ret_code != 0 ]; then