| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 import datetime | 7 import datetime |
| 8 import getpass | 8 import getpass |
| 9 import math | 9 import math |
| 10 from matplotlib.font_manager import FontProperties | 10 from matplotlib.font_manager import FontProperties |
| 11 import matplotlib.pyplot as plt | 11 import matplotlib.pyplot as plt |
| 12 import optparse | 12 import optparse |
| 13 import os | 13 import os |
| 14 from os.path import dirname, abspath | 14 from os.path import dirname, abspath |
| 15 import platform | 15 import platform |
| 16 import shutil | 16 import shutil |
| 17 import stat |
| 17 import subprocess | 18 import subprocess |
| 19 import sys |
| 18 import time | 20 import time |
| 19 import traceback | 21 import traceback |
| 20 import sys | |
| 21 | 22 |
| 22 TOOLS_PATH = os.path.join(dirname(dirname(dirname(abspath(__file__))))) | 23 TOOLS_PATH = os.path.join(dirname(dirname(dirname(abspath(__file__))))) |
| 23 sys.path.append(TOOLS_PATH) | 24 sys.path.append(TOOLS_PATH) |
| 24 import utils | 25 import utils |
| 25 | 26 |
| 26 """This script runs to track performance and correctness progress of | 27 """This script runs to track performance and correctness progress of |
| 27 different svn revisions. It tests to see if there a newer version of the code on | 28 different svn revisions. It tests to see if there a newer version of the code on |
| 28 the server, and will sync and run the performance tests if so.""" | 29 the server, and will sync and run the performance tests if so.""" |
| 29 | 30 |
| 30 DART_INSTALL_LOCATION = os.path.join(dirname(abspath(__file__)), | 31 DART_INSTALL_LOCATION = os.path.join(dirname(abspath(__file__)), |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 os.chdir(DART_INSTALL_LOCATION) | 97 os.chdir(DART_INSTALL_LOCATION) |
| 97 #Revert our newly built minfrog to prevent conflicts when we update | 98 #Revert our newly built minfrog to prevent conflicts when we update |
| 98 run_cmd(['svn', 'revert', os.path.join(os.getcwd(), 'frog', 'minfrog')]) | 99 run_cmd(['svn', 'revert', os.path.join(os.getcwd(), 'frog', 'minfrog')]) |
| 99 | 100 |
| 100 run_cmd(['gclient', 'sync']) | 101 run_cmd(['gclient', 'sync']) |
| 101 | 102 |
| 102 # On Windows, the output directory is marked as "Read Only," which causes an | 103 # On Windows, the output directory is marked as "Read Only," which causes an |
| 103 # error to be thrown when we use shutil.rmtree. This helper function changes | 104 # error to be thrown when we use shutil.rmtree. This helper function changes |
| 104 # the permissions so we can still delete the directory. | 105 # the permissions so we can still delete the directory. |
| 105 def on_rm_error(func, path, exc_info): | 106 def on_rm_error(func, path, exc_info): |
| 106 os.chmod(path, stat.S_IWRITE) | 107 if os.path.exists(path): |
| 107 os.unlink(path) | 108 os.chmod(path, stat.S_IWRITE) |
| 109 os.unlink(path) |
| 108 # TODO(efortuna): building the sdk locally is a band-aid until all build | 110 # TODO(efortuna): building the sdk locally is a band-aid until all build |
| 109 # platform SDKs are hosted in Google storage. Pull from https://sandbox. | 111 # platform SDKs are hosted in Google storage. Pull from https://sandbox. |
| 110 # google.com/storage/?arg=dart-dump-render-tree#dart-dump-render-tree%2Fsdk | 112 # google.com/storage/?arg=dart-dump-render-tree#dart-dump-render-tree%2Fsdk |
| 111 # eventually. | 113 # eventually. |
| 112 # TODO(efortuna): Currently always building ia32 architecture because we don't | 114 # TODO(efortuna): Currently always building ia32 architecture because we don't |
| 113 # have test statistics for what's passing on x64. Eliminate arch specification | 115 # have test statistics for what's passing on x64. Eliminate arch specification |
| 114 # when we have tests running on x64, too. | 116 # when we have tests running on x64, too. |
| 115 shutil.rmtree(os.path.join(os.getcwd(), | 117 shutil.rmtree(os.path.join(os.getcwd(), |
| 116 utils.GetBuildRoot(utils.GuessOS(), 'release', 'ia32')), | 118 utils.GetBuildRoot(utils.GuessOS(), 'release', 'ia32')), |
| 117 onerror=on_rm_error) | 119 onerror=on_rm_error) |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 while True: | 767 while True: |
| 766 if has_new_code(): | 768 if has_new_code(): |
| 767 run_test_sequence(cl, size, language, perf, username, password) | 769 run_test_sequence(cl, size, language, perf, username, password) |
| 768 else: | 770 else: |
| 769 time.sleep(SLEEP_TIME) | 771 time.sleep(SLEEP_TIME) |
| 770 else: | 772 else: |
| 771 run_test_sequence(cl, size, language, perf, username, password) | 773 run_test_sequence(cl, size, language, perf, username, password) |
| 772 | 774 |
| 773 if __name__ == '__main__': | 775 if __name__ == '__main__': |
| 774 main() | 776 main() |
| OLD | NEW |