tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ci_built_diff.sh (746B)


      1 #!/bin/bash
      2 set -ex
      3 
      4 SCRIPT_DIR=$(cd $(dirname "$0") && pwd -P)
      5 WPT_ROOT=$SCRIPT_DIR/../..
      6 cd $WPT_ROOT
      7 
      8 main() {
      9    # Diff PNGs based on pixel-for-pixel identity
     10    echo -e '[diff "img"]\n  textconv = identify -quiet -format "%#"' >> .git/config
     11    echo -e '*.png diff=img' >> .git/info/attributes
     12 
     13    # Exclude tests that rely on font rendering
     14    excluded=(
     15        'html/canvas/element/text/2d.text.draw.fill.basic.png'
     16        'html/canvas/element/text/2d.text.draw.fill.maxWidth.large.png'
     17        'html/canvas/element/text/2d.text.draw.fill.rtl.png'
     18        'html/canvas/element/text/2d.text.draw.stroke.basic.png'
     19    )
     20 
     21    ./wpt update-built
     22    git update-index --assume-unchanged ${excluded[*]}
     23    git diff --exit-code
     24 }
     25 
     26 main