tree: 16c39968918b79416165403ea9baed43efe9049c [path history] [tgz]
  1. bin/
  2. lib/
  3. test/
  4. pubspec.yaml
  5. README.md
tools/compare_goldens/README.md

Compare Goldens

This is a script that will let you check golden image diffs locally.

The directories are scanned for png files that match in name, then the diff is written to diff_<name of file> in the CWD. This allows you to get results quicker than having to upload to skia gold. By default it uses fuzzy RMSE to compare.

Usage

dart run compare_goldens <dir path> <dir path>

Here's the steps for using this with something like impeller golden tests:

  1. Checkout a base revision
  2. Build impeller_golden_tests
  3. Execute `impeller_golden_tests --working_dir=<path a>
  4. Checkout test revision
  5. Build impeller_golden_tests
  6. Execute `impeller_golden_tests --working_dir=<path b>
  7. Execute `compare_goldens <path a> <path b>

Requirements

  • ImageMagick is installed on $PATH

Testing

To run the tests:

dart pub get
find . -name "*_test.dart" | xargs -n 1 dart --enable-asserts