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

Unified Diff: tools/testing/perf_testing/create_graph.py

Issue 9025024: Changes to testing script so we can run on Windows. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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/testing/perf_testing/create_graph.py
===================================================================
--- tools/testing/perf_testing/create_graph.py (revision 2777)
+++ tools/testing/perf_testing/create_graph.py (working copy)
@@ -19,7 +19,13 @@
import subprocess
import time
import traceback
+import sys
+TOOLS_PATH = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(
Jennifer Messerly 2011/12/22 19:54:12 personally I'd do "from os.path import join, dirna
+ os.path.abspath(__file__)))))
+sys.path.append(TOOLS_PATH)
+import utils
+
"""This script runs to track performance and correctness progress of
different svn revisions. It tests to see if there a newer version of the code on
the server, and will sync and run the performance tests if so."""
@@ -38,6 +44,10 @@
SLEEP_TIME = 200
PERFBOT_MODE = False
VERBOSE = False
+HAS_SHELL = False
+if platform.system() == 'Windows':
+ # On Windows, shell must be true to get the correct environment variables.
+ HAS_SHELL = True
"""First, some utility methods."""
@@ -56,13 +66,8 @@
if append:
mode = 'a'
out = open(outfile, mode)
- p = ''
- if platform.system() == 'Windows':
- # On Windows, shell must be true to get the correct environment variables.
- p = subprocess.Popen(cmd_list, stdout = out, stderr = subprocess.PIPE,
- shell=True)
- else:
- p = subprocess.Popen(cmd_list, stdout = out, stderr = subprocess.PIPE)
+ p = subprocess.Popen(cmd_list, stdout = out, stderr = subprocess.PIPE,
+ shell=HAS_SHELL)
output, not_used = p.communicate();
if output:
print output
@@ -87,33 +92,28 @@
RunCmd(['svn', 'revert', os.path.join(os.getcwd(), 'frog', 'minfrog')])
RunCmd(['gclient', 'sync'])
- #TODO(efortuna): Temporary fix to get IE data without requiring Dart to build
- # on Windows. Take this out once we have SDKs or can build on Windows.
- if platform.system() != 'Windows':
- lines = RunCmd([os.path.join('.', 'tools', 'build.py'), '-m', 'release'])
- os.chdir('frog')
- lines += RunCmd([os.path.join('..', 'tools', 'build.py'), '-m',
- 'debug,release'])
- os.chdir('..')
+ # TODO(efortuna): building the sdk locally is a band-aid until all build
+ # platform SDKs are hosted in Google storage. Pull from https://sandbox.
+ # google.com/storage/?arg=dart-dump-render-tree#dart-dump-render-tree%2Fsdk
+ # eventually.
+ # TODO(efortuna): Currently always building ia32 architecture because we don't
+ # have test statistics for what's passing on x64. Eliminate arch specification
+ # when we have tests running on x64, too.
+ lines = RunCmd([os.path.join('.', 'tools', 'build.py'), '-m', 'release',
+ '--arch=ia32', 'create_sdk'])
- for line in lines:
- if 'BUILD FAILED' in lines:
- if failed_once:
- # Someone checked in a broken build! Just stop trying to make it work
- # and wait for the next hour to try again.
- print 'Broken Build'
- return 1
- #Remove the xcode directory and attempt to build again. If it still
- #fails, abort, and try again next hour.
- out_dir = 'out'
- if platform.system() == 'Darwin':
- out_dir = 'xcodebuild'
- shutil.rmtree(os.path.join(os.getcwd(), out_dir, 'Release_ia32'))
- shutil.rmtree(os.path.join(os.getcwd(), 'frog', out_dir,
- 'Debug_ia32'))
- shutil.rmtree(os.path.join(os.getcwd(), 'frog', out_dir,
- 'Release_ia32'))
- SyncAndBuild(True)
+ for line in lines:
+ if 'BUILD FAILED' in lines:
+ if failed_once:
+ # Someone checked in a broken build! Just stop trying to make it work
+ # and wait to try again.
+ print 'Broken Build'
+ return 1
+ #Remove the xcode directory and attempt to build again. If it still
Jennifer Messerly 2011/12/22 19:54:12 should this say "Remove the output directory?"
+ #fails, abort, and try again in a little bit.
+ shutil.rmtree(os.path.join(os.getcwd(),
+ utils.GetBuildRoot(utils.GuessOS(), 'release', 'ia32')))
+ SyncAndBuild(True)
return 0
def EnsureOutputDirectory(dir_name):
@@ -263,7 +263,7 @@
def AddSvnRevisionToTrace(self, outfile):
"""Add the svn version number to the provided tracefile."""
p = subprocess.Popen(['svn', 'info'], stdout = subprocess.PIPE,
- stderr = subprocess.STDOUT)
+ stderr = subprocess.STDOUT, shell = HAS_SHELL)
output, not_used = p.communicate()
for line in output.split('\n'):
if 'Revision' in line:
@@ -538,8 +538,12 @@
self.trace_file = os.path.join('tools', 'testing',
'perf_testing', self.result_folder_name, current_file)
self.AddSvnRevisionToTrace(self.trace_file)
+ dart_sdk = os.path.join(os.getcwd(), utils.GetBuildRoot(utils.GuessOS(),
+ 'release', 'ia32'), 'dart-sdk')
RunCmd([os.path.join('.', 'tools', 'test.py'),
- '--component=webdriver', '--flag=%s' % browser, '--report',
+ '--component=webdriver', '--flag=%s' % browser, '--flag=--frog=%s' % \
+ os.path.join(dart_sdk, 'bin', 'frogc'),
+ '--flag=--froglib=%s' % os.path.join(dart_sdk, 'lib'),
'--timeout=20', '--progress=color', '--mode=release', '-j1',
self.test_type], self.trace_file, append=True)
« 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