rebaseline.py: in option names, replace underscores with hyphens
Split off of already-reviewed https://codereview.chromium.org/15789010/ ('rebaseline.py: --tests and --configs are now FILTERS within json results') Review URL: https://codereview.chromium.org/15904018 git-svn-id: http://skia.googlecode.com/svn/trunk@9504 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
0a1c3872de
commit
82f317815e
@ -259,15 +259,15 @@ parser.add_argument('--configs', metavar='CONFIG', nargs='+',
|
|||||||
'"--configs 565 8888"; if unspecified, run a default ' +
|
'"--configs 565 8888"; if unspecified, run a default ' +
|
||||||
'set of configs. This should ONLY be specified if ' +
|
'set of configs. This should ONLY be specified if ' +
|
||||||
'--tests has also been specified.')
|
'--tests has also been specified.')
|
||||||
parser.add_argument('--dry_run', action='store_true',
|
parser.add_argument('--dry-run', action='store_true',
|
||||||
help='instead of actually downloading files or adding ' +
|
help='instead of actually downloading files or adding ' +
|
||||||
'files to checkout, display a list of operations that ' +
|
'files to checkout, display a list of operations that ' +
|
||||||
'we would normally perform')
|
'we would normally perform')
|
||||||
parser.add_argument('--json_base_url',
|
parser.add_argument('--json-base-url',
|
||||||
help='base URL from which to read JSON_FILENAME ' +
|
help='base URL from which to read JSON_FILENAME ' +
|
||||||
'files; defaults to %(default)s',
|
'files; defaults to %(default)s',
|
||||||
default='http://skia-autogen.googlecode.com/svn/gm-actual')
|
default='http://skia-autogen.googlecode.com/svn/gm-actual')
|
||||||
parser.add_argument('--json_filename',
|
parser.add_argument('--json-filename',
|
||||||
help='filename (under JSON_BASE_URL) to read a summary ' +
|
help='filename (under JSON_BASE_URL) to read a summary ' +
|
||||||
'of results from; defaults to %(default)s',
|
'of results from; defaults to %(default)s',
|
||||||
default='actual-results.json')
|
default='actual-results.json')
|
||||||
|
@ -1 +1 @@
|
|||||||
python tools/rebaseline.py --dry_run --tests test1 test2
|
python tools/rebaseline.py --dry-run --tests test1 test2
|
||||||
|
@ -1 +1 @@
|
|||||||
python tools/rebaseline.py --dry_run --tests test1 test2 --configs 565 8888 --subdirs base-android-galaxy-nexus base-shuttle-win7-intel-float
|
python tools/rebaseline.py --dry-run --tests test1 test2 --configs 565 8888 --subdirs base-android-galaxy-nexus base-shuttle-win7-intel-float
|
||||||
|
@ -1 +1 @@
|
|||||||
python tools/rebaseline.py --dry_run --json_base_url file:tools/tests/rebaseline/input/json1 --subdirs base-android-galaxy-nexus base-shuttle-win7-intel-float
|
python tools/rebaseline.py --dry-run --json-base-url file:tools/tests/rebaseline/input/json1 --subdirs base-android-galaxy-nexus base-shuttle-win7-intel-float
|
||||||
|
@ -129,8 +129,8 @@ function benchgraph_test {
|
|||||||
compare_directories $EXPECTED_OUTPUT_DIR $ACTUAL_OUTPUT_DIR
|
compare_directories $EXPECTED_OUTPUT_DIR $ACTUAL_OUTPUT_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run rebaseline.py with arguments in $1, recording its dry_run output.
|
# Run rebaseline.py with arguments in $1, recording its dry-run output.
|
||||||
# Then compare that dry_run output to the content of $2/output-expected.
|
# Then compare that dry-run output to the content of $2/output-expected.
|
||||||
function rebaseline_test {
|
function rebaseline_test {
|
||||||
if [ $# != 2 ]; then
|
if [ $# != 2 ]; then
|
||||||
echo "rebaseline_test requires exactly 2 parameters, got $#"
|
echo "rebaseline_test requires exactly 2 parameters, got $#"
|
||||||
@ -142,7 +142,7 @@ function rebaseline_test {
|
|||||||
|
|
||||||
rm -rf $ACTUAL_OUTPUT_DIR
|
rm -rf $ACTUAL_OUTPUT_DIR
|
||||||
mkdir -p $ACTUAL_OUTPUT_DIR
|
mkdir -p $ACTUAL_OUTPUT_DIR
|
||||||
COMMAND="python tools/rebaseline.py --dry_run $ARGS"
|
COMMAND="python tools/rebaseline.py --dry-run $ARGS"
|
||||||
echo "$COMMAND" >$ACTUAL_OUTPUT_DIR/command_line
|
echo "$COMMAND" >$ACTUAL_OUTPUT_DIR/command_line
|
||||||
$COMMAND &>$ACTUAL_OUTPUT_DIR/stdout
|
$COMMAND &>$ACTUAL_OUTPUT_DIR/stdout
|
||||||
echo $? >$ACTUAL_OUTPUT_DIR/return_value
|
echo $? >$ACTUAL_OUTPUT_DIR/return_value
|
||||||
@ -211,6 +211,6 @@ REBASELINE_INPUT=tools/tests/rebaseline/input
|
|||||||
REBASELINE_OUTPUT=tools/tests/rebaseline/output
|
REBASELINE_OUTPUT=tools/tests/rebaseline/output
|
||||||
rebaseline_test "--tests test1 test2 --configs 565 8888 --subdirs base-android-galaxy-nexus base-shuttle-win7-intel-float" "$REBASELINE_OUTPUT/subset"
|
rebaseline_test "--tests test1 test2 --configs 565 8888 --subdirs base-android-galaxy-nexus base-shuttle-win7-intel-float" "$REBASELINE_OUTPUT/subset"
|
||||||
rebaseline_test "--tests test1 test2" "$REBASELINE_OUTPUT/all"
|
rebaseline_test "--tests test1 test2" "$REBASELINE_OUTPUT/all"
|
||||||
rebaseline_test "--json_base_url file:$REBASELINE_INPUT/json1 --subdirs base-android-galaxy-nexus base-shuttle-win7-intel-float" "$REBASELINE_OUTPUT/using-json1"
|
rebaseline_test "--json-base-url file:$REBASELINE_INPUT/json1 --subdirs base-android-galaxy-nexus base-shuttle-win7-intel-float" "$REBASELINE_OUTPUT/using-json1"
|
||||||
|
|
||||||
echo "All tests passed."
|
echo "All tests passed."
|
||||||
|
Loading…
Reference in New Issue
Block a user