| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 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 # Compare the current working copy of the repository to either a clean copy | 7 # Compare the current working copy of the repository to either a clean copy |
| 8 # or the specified revision. | 8 # or the specified revision. |
| 9 # Along with the files created by compiler_metrics.sh, creates | 9 # Along with the files created by compiler_metrics.sh, creates |
| 10 # compiler_compare[_stats_[12]].log in the working direcetory and a | 10 # compiler_compare[_stats_[12]].log in the working direcetory and a |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 # zero out files | 147 # zero out files |
| 148 echo "" > $LOG_FILE | 148 echo "" > $LOG_FILE |
| 149 echo "" > $STAT1 | 149 echo "" > $STAT1 |
| 150 echo "" > $STAT2 | 150 echo "" > $STAT2 |
| 151 | 151 |
| 152 # Do the first test | 152 # Do the first test |
| 153 echo "Compiling dartc with your changes (mode=release)" | 153 echo "Compiling dartc with your changes (mode=release)" |
| 154 cd $ROOT_OF_REPO/compiler | 154 cd $ROOT_OF_REPO/compiler |
| 155 gclient runhooks >> $LOG_FILE 2>&1 | 155 gclient runhooks >> $LOG_FILE 2>&1 |
| 156 ../tools/build.py --mode release --arch dartc >> $LOG_FILE 2>&1 | 156 ../tools/build.py --mode release >> $LOG_FILE 2>&1 |
| 157 failTest $? "Error compiling your location changes, check $LOG_FILE" | 157 failTest $? "Error compiling your location changes, check $LOG_FILE" |
| 158 | 158 |
| 159 echo "Running first test against current working copy" | 159 echo "Running first test against current working copy" |
| 160 echo $SCRIPT_PATH/compiler_metrics.sh --stats-prefix=yours --dartc=./out/Release
_dartc/dartc $COMPARE_OPTIONS --app=$APP >> $LOG_FILE | 160 echo $SCRIPT_PATH/compiler_metrics.sh --stats-prefix=yours --dartc=./out/Release
_dartc/dartc $COMPARE_OPTIONS --app=$APP >> $LOG_FILE |
| 161 $SCRIPT_PATH/compiler_metrics.sh --stats-prefix=yours --dartc=./out/Release_dart
c/dartc $COMPARE_OPTIONS --app=$APP > $STAT1 | 161 $SCRIPT_PATH/compiler_metrics.sh --stats-prefix=yours --dartc=./out/Release_dart
c/dartc $COMPARE_OPTIONS --app=$APP > $STAT1 |
| 162 failTest $? "Error collecting statistics from working copy" | 162 failTest $? "Error collecting statistics from working copy" |
| 163 | 163 |
| 164 # switch to tmp for remainder of building | 164 # switch to tmp for remainder of building |
| 165 cd $TMP_DIR | 165 cd $TMP_DIR |
| 166 | 166 |
| 167 gclient config https://dart.googlecode.com/svn/branches/bleeding_edge/deps/compi
ler.deps >> $LOG_FILE 2>&1 | 167 gclient config https://dart.googlecode.com/svn/branches/bleeding_edge/deps/compi
ler.deps >> $LOG_FILE 2>&1 |
| 168 failTest $? "Error calling gclient config" | 168 failTest $? "Error calling gclient config" |
| 169 | 169 |
| 170 GCLIENT_SYNC="-t " | 170 GCLIENT_SYNC="-t " |
| 171 if [ "" != "$REV" ]; then | 171 if [ "" != "$REV" ]; then |
| 172 GCLIENT_SYNC+="--revision=$REV" | 172 GCLIENT_SYNC+="--revision=$REV" |
| 173 fi | 173 fi |
| 174 | 174 |
| 175 echo "Checking out clean version of $REV; will take some time. Look at $LOG_FILE
for progress" | 175 echo "Checking out clean version of $REV; will take some time. Look at $LOG_FILE
for progress" |
| 176 gclient sync $GCLIENT_SYNC >> $LOG_FILE 2>&1 | 176 gclient sync $GCLIENT_SYNC >> $LOG_FILE 2>&1 |
| 177 failTest $? "Error calling gclient sync" | 177 failTest $? "Error calling gclient sync" |
| 178 | 178 |
| 179 echo "Compiler clean version; may take some time" | 179 echo "Compiler clean version; may take some time" |
| 180 cd compiler | 180 cd compiler |
| 181 gclient runhooks >> $LOG_FILE 2>&1 | 181 gclient runhooks >> $LOG_FILE 2>&1 |
| 182 ../tools/build.py --mode release --arch dartc >> $LOG_FILE 2>&1 | 182 ../tools/build.py --mode release >> $LOG_FILE 2>&1 |
| 183 failTest $? "Error compiling comparison revision" | 183 failTest $? "Error compiling comparison revision" |
| 184 | 184 |
| 185 # Do the second test | 185 # Do the second test |
| 186 echo "Running second test against clean copy" | 186 echo "Running second test against clean copy" |
| 187 echo $SCRIPT_PATH/compiler_metrics.sh --stats-prefix=clean --dartc=./out/Release
_dartc/dartc $COMPARE_OPTIONS --app=$APP >> $LOG_FILE | 187 echo $SCRIPT_PATH/compiler_metrics.sh --stats-prefix=clean --dartc=./out/Release
_dartc/dartc $COMPARE_OPTIONS --app=$APP >> $LOG_FILE |
| 188 $SCRIPT_PATH/compiler_metrics.sh --stats-prefix=clean --dartc=./out/Release_dart
c/dartc $COMPARE_OPTIONS --app=$APP > $STAT2 | 188 $SCRIPT_PATH/compiler_metrics.sh --stats-prefix=clean --dartc=./out/Release_dart
c/dartc $COMPARE_OPTIONS --app=$APP > $STAT2 |
| 189 failTest $? "Error collecting statistics from clean copy" | 189 failTest $? "Error collecting statistics from clean copy" |
| 190 | 190 |
| 191 calcStats | 191 calcStats |
| OLD | NEW |