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

Unified Diff: tools/rebaseline.py

Issue 15660014: rebaseline.py : add self-tests (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/rebaseline.py
===================================================================
--- tools/rebaseline.py (revision 9354)
+++ tools/rebaseline.py (working copy)
@@ -17,7 +17,6 @@
import os
import subprocess
import sys
-import tempfile
# Mapping of gm-expectations subdir (under
# https://skia.googlecode.com/svn/gm-expected/ )
@@ -76,12 +75,10 @@
os.path.exists(os.path.join(os.pardir, '.git')))
# Execute subprocess.call(), unless dry_run is True
- def _Call(self, cmd, stdout=None):
+ def _Call(self, cmd):
if self._dry_run:
print '%s' % ' '.join(cmd)
return 0
- if stdout:
- return subprocess.call(cmd, stdout=stdout)
else:
return subprocess.call(cmd)
@@ -91,14 +88,11 @@
url = ('http://skia-autogen.googlecode.com/svn/gm-actual/' +
expectations_subdir + '/' + builder_name + '/' +
expectations_subdir + '/' + infilename)
- cmd = [ 'curl', '--fail', '--silent', url ]
- temp = tempfile.NamedTemporaryFile()
- ret = self._Call(cmd, stdout=temp)
+ cmd = [ 'curl', '--fail', '--silent', url, '--output', outfilename ]
epoger 2013/05/30 19:44:12 Patchset 1 changes the "curl" command so that a te
+ ret = self._Call(cmd)
if ret != 0:
print '# Couldn\'t fetch ' + url
return
- cmd = [ 'cp', temp.name, outfilename ]
- self._Call(cmd);
if self._is_svn_checkout:
cmd = [ 'svn', 'add', '--quiet', outfilename ]
self._Call(cmd)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698