Index: tools/testing/perf_testing/create_graph.py |
=================================================================== |
--- tools/testing/perf_testing/create_graph.py (revision 3859) |
+++ tools/testing/perf_testing/create_graph.py (working copy) |
@@ -92,6 +92,13 @@ |
run_cmd(['svn', 'revert', os.path.join(os.getcwd(), 'frog', 'minfrog')]) |
run_cmd(['gclient', 'sync']) |
+ |
+ # On Windows, the output directory is marked as "Read Only," which causes an |
+ # error to be thrown when we use shutil.rmtree. This helper function changes |
+ # the permissions so we can still delete the directory. |
+ def on_rm_error(func, path, exc_info): |
+ os.chmod(path, stat.S_IWRITE) |
+ os.unlink(path) |
# 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 |
@@ -100,7 +107,7 @@ |
# have test statistics for what's passing on x64. Eliminate arch specification |
# when we have tests running on x64, too. |
shutil.rmtree(os.path.join(os.getcwd(), |
- utils.GetBuildRoot(utils.GuessOS(), 'release', 'ia32'))) |
+ utils.GetBuildRoot(utils.GuessOS(), 'release', 'ia32')), onerror=on_rm_error) |
Siggi Cherem (dart-lang)
2012/02/02 19:22:16
80 col
|
lines = run_cmd([os.path.join('.', 'tools', 'build.py'), '-m', 'release', |
'--arch=ia32', 'create_sdk']) |