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

Side by Side Diff: tools/tests/run.sh

Issue 15904018: rebaseline.py: in option names, replace underscores with hyphens (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/tests/rebaseline/output/using-json1/output-expected/command_line ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Tests for our tools. 3 # Tests for our tools.
4 # 4 #
5 # TODO: currently, this only passes on Linux (which is the platform that 5 # TODO: currently, this only passes on Linux (which is the platform that
6 # the housekeeper bot runs on, e.g. 6 # the housekeeper bot runs on, e.g.
7 # http://70.32.156.51:10117/builders/Skia_PerCommit_House_Keeping/builds/1415/st eps/RunToolSelfTests/logs/stdio ) 7 # http://70.32.156.51:10117/builders/Skia_PerCommit_House_Keeping/builds/1415/st eps/RunToolSelfTests/logs/stdio )
8 # See https://code.google.com/p/skia/issues/detail?id=677 8 # See https://code.google.com/p/skia/issues/detail?id=677
9 # ('make tools/tests/run.sh work cross-platform') 9 # ('make tools/tests/run.sh work cross-platform')
10 # Ideally, these tests should pass on all development platforms... 10 # Ideally, these tests should pass on all development platforms...
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 $COMMAND &>$ACTUAL_OUTPUT_DIR/stdout 122 $COMMAND &>$ACTUAL_OUTPUT_DIR/stdout
123 echo $? >$ACTUAL_OUTPUT_DIR/return_value 123 echo $? >$ACTUAL_OUTPUT_DIR/return_value
124 END_TIMESTAMP=$(date +%s) 124 END_TIMESTAMP=$(date +%s)
125 125
126 SECONDS_RUN=$(expr $END_TIMESTAMP - $START_TIMESTAMP) 126 SECONDS_RUN=$(expr $END_TIMESTAMP - $START_TIMESTAMP)
127 echo "bench_graph_svg.py for $PLATFORM took $SECONDS_RUN seconds to complete" 127 echo "bench_graph_svg.py for $PLATFORM took $SECONDS_RUN seconds to complete"
128 128
129 compare_directories $EXPECTED_OUTPUT_DIR $ACTUAL_OUTPUT_DIR 129 compare_directories $EXPECTED_OUTPUT_DIR $ACTUAL_OUTPUT_DIR
130 } 130 }
131 131
132 # Run rebaseline.py with arguments in $1, recording its dry_run output. 132 # Run rebaseline.py with arguments in $1, recording its dry-run output.
133 # Then compare that dry_run output to the content of $2/output-expected. 133 # Then compare that dry-run output to the content of $2/output-expected.
134 function rebaseline_test { 134 function rebaseline_test {
135 if [ $# != 2 ]; then 135 if [ $# != 2 ]; then
136 echo "rebaseline_test requires exactly 2 parameters, got $#" 136 echo "rebaseline_test requires exactly 2 parameters, got $#"
137 exit 1 137 exit 1
138 fi 138 fi
139 ARGS="$1" 139 ARGS="$1"
140 ACTUAL_OUTPUT_DIR="$2/output-actual" 140 ACTUAL_OUTPUT_DIR="$2/output-actual"
141 EXPECTED_OUTPUT_DIR="$2/output-expected" 141 EXPECTED_OUTPUT_DIR="$2/output-expected"
142 142
143 rm -rf $ACTUAL_OUTPUT_DIR 143 rm -rf $ACTUAL_OUTPUT_DIR
144 mkdir -p $ACTUAL_OUTPUT_DIR 144 mkdir -p $ACTUAL_OUTPUT_DIR
145 COMMAND="python tools/rebaseline.py --dry_run $ARGS" 145 COMMAND="python tools/rebaseline.py --dry-run $ARGS"
146 echo "$COMMAND" >$ACTUAL_OUTPUT_DIR/command_line 146 echo "$COMMAND" >$ACTUAL_OUTPUT_DIR/command_line
147 $COMMAND &>$ACTUAL_OUTPUT_DIR/stdout 147 $COMMAND &>$ACTUAL_OUTPUT_DIR/stdout
148 echo $? >$ACTUAL_OUTPUT_DIR/return_value 148 echo $? >$ACTUAL_OUTPUT_DIR/return_value
149 149
150 compare_directories $EXPECTED_OUTPUT_DIR $ACTUAL_OUTPUT_DIR 150 compare_directories $EXPECTED_OUTPUT_DIR $ACTUAL_OUTPUT_DIR
151 } 151 }
152 152
153 153
154 154
155 # 155 #
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 fi 204 fi
205 205
206 # 206 #
207 # Test rebaseline.py ... 207 # Test rebaseline.py ...
208 # 208 #
209 209
210 REBASELINE_INPUT=tools/tests/rebaseline/input 210 REBASELINE_INPUT=tools/tests/rebaseline/input
211 REBASELINE_OUTPUT=tools/tests/rebaseline/output 211 REBASELINE_OUTPUT=tools/tests/rebaseline/output
212 rebaseline_test "--tests test1 test2 --configs 565 8888 --subdirs base-android-g alaxy-nexus base-shuttle-win7-intel-float" "$REBASELINE_OUTPUT/subset" 212 rebaseline_test "--tests test1 test2 --configs 565 8888 --subdirs base-android-g alaxy-nexus base-shuttle-win7-intel-float" "$REBASELINE_OUTPUT/subset"
213 rebaseline_test "--tests test1 test2" "$REBASELINE_OUTPUT/all" 213 rebaseline_test "--tests test1 test2" "$REBASELINE_OUTPUT/all"
214 rebaseline_test "--json_base_url file:$REBASELINE_INPUT/json1 --subdirs base-and roid-galaxy-nexus base-shuttle-win7-intel-float" "$REBASELINE_OUTPUT/using-json1 " 214 rebaseline_test "--json-base-url file:$REBASELINE_INPUT/json1 --subdirs base-and roid-galaxy-nexus base-shuttle-win7-intel-float" "$REBASELINE_OUTPUT/using-json1 "
215 215
216 echo "All tests passed." 216 echo "All tests passed."
OLDNEW
« no previous file with comments | « tools/tests/rebaseline/output/using-json1/output-expected/command_line ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698