Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update-built-tests.sh locally results in many differences #23293

Open
foolip opened this issue Apr 28, 2020 · 3 comments
Open

update-built-tests.sh locally results in many differences #23293

foolip opened this issue Apr 28, 2020 · 3 comments

Comments

@foolip
Copy link
Member

foolip commented Apr 28, 2020

On a Linux machine (not macOS as in #23292) running ./update-built-tests.sh from a completely clean (git clean -fdx'd) repo results in a bunch of changes. git status shows:

HEAD detached at origin/master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.basic.png
	modified:   2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large.png
	modified:   2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.rtl.png
	modified:   2dcontext/drawing-text-to-the-canvas/2d.text.draw.stroke.basic.png
	modified:   offscreen-canvas/text/2d.text.draw.fill.basic.png
	modified:   offscreen-canvas/text/2d.text.draw.fill.maxWidth.large.png
	modified:   offscreen-canvas/text/2d.text.draw.fill.rtl.png
	modified:   offscreen-canvas/text/2d.text.draw.stroke.basic.png

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	2dcontext/annotated-spec.html
	2dcontext/clear-100x50.png
	2dcontext/green-100x50.png
	generated-mime-types.json
	offscreen-canvas/green-100x50.png

no changes added to commit (use "git add" and/or "git commit -a")

The problems are:

  • PNGs with differences
  • generated-mime-types.json is written to the wrong location, should be mimesniff/mime-types/resources/generated-mime-types.json
  • 2dcontext/annotated-spec.html is created. Is it needed for anything?
@foolip
Copy link
Member Author

foolip commented Apr 29, 2020

#23070 renamed some things so annotated-spec.html will be elsewhere now.

@foolip foolip changed the title update-built-tests.sh locally update-built-tests.sh locally results in many differences Apr 30, 2020
@stephenmcgruer
Copy link
Contributor

This is what I see:

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        generated-mime-types.json
        html/canvas/element/green-100x50.png
        html/canvas/offscreen/green-100x50.png

./tools/ci/ci_built_diff.sh returns clean, looks like it explicitly excludes some files:

    # Exclude tests that rely on font rendering
    excluded=(
        'html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.basic.png'
        'html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large.png'
        'html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.rtl.png'
        'html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.stroke.basic.png'
        'html/canvas/offscreen/text/2d.text.draw.fill.basic.png'
        'html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large.png'
        'html/canvas/offscreen/text/2d.text.draw.fill.rtl.png'
        'html/canvas/offscreen/text/2d.text.draw.stroke.basic.png'
    )

And indeed they appear to be ignored:

$ git ls-files -v|grep '^h'
h html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.basic.png
h html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large.png
h html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.rtl.png
h html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.stroke.basic.png
h html/canvas/offscreen/text/2d.text.draw.fill.basic.png
h html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large.png
h html/canvas/offscreen/text/2d.text.draw.fill.rtl.png
h html/canvas/offscreen/text/2d.text.draw.stroke.basic.png

This seems to be a deliberate ignoring, so cc @jgraham and @Hexcles who have modified the diff-checker tool and may have some background, but otherwise marking backlog.

@Hexcles
Copy link
Member

Hexcles commented May 27, 2020

PNGs with differences
This is what @stephenmcgruer pointed to. Essentially, these automatically generated assets include text which vary subtly depending on system fonts and rendering settings, so they are intentionally ignored.

Perhaps we could expand "# Exclude tests that rely on font rendering" to include more explanation, but I'm not sure what.

Meanwhile, we should ask someone more familiar with these canvas/2dcontext tests regarding the other two cases. Also, it's probably up to them if they want to invest making the asset generation platform-independent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants