diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2012-03-03 14:42:51 +0100 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2012-03-03 20:11:29 +0100 |
commit | 9d28b8db3561845f4ca94c29479a259ceaf78bc5 (patch) | |
tree | 579ebc1767df2e2437c729c5f89b5f71b62f83da /regtest/commands | |
parent | 670ea176495b8b580daba061840c914714bf422d (diff) |
regtest: Add --pretty-diff option to create-report command
It includes a pretty-diff link to make a bit easier to check differences
in test results. For images it creates a html with javascript that
toggles actual and expected image, using the same code than WebKit
layout test results. For text files it uses HtmlDiff class from python
difflib. It's an option disabled by default because pretty diff for text
files is very slow.
Diffstat (limited to 'regtest/commands')
-rw-r--r-- | regtest/commands/create-report.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/regtest/commands/create-report.py b/regtest/commands/create-report.py index 89b66872..768da628 100644 --- a/regtest/commands/create-report.py +++ b/regtest/commands/create-report.py @@ -37,10 +37,14 @@ class CreateReport(Command): parser.add_argument('-o', '--out-dir', action = 'store', dest = 'out_dir', default = os.path.join(tempfile.gettempdir(), 'out'), help = 'Directory containing the results') + parser.add_argument('-p', '--pretty-diff', + action = 'store_true', dest = 'pretty_diff', default = False, + help = 'Include pretty diff output') parser.add_argument('tests') def run(self, options): config = Config() + config.pretty_diff = options['pretty_diff'] doc = options['tests'] if os.path.isdir(doc): |