Skip to content

Run integration tests on both the CPU and GPU (again) #598

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

Merged

Conversation

adroitwhiz
Copy link
Contributor

@adroitwhiz adroitwhiz commented May 7, 2020

Depends on #597

Resolves

Resolves #587

Proposed Changes

This PR adapts the changes in f9428ee to the new Playwright-based testing code.

Reason for Changes

This should increase test coverage and hopefully prevent future bugs that only occur on either the CPU or GPU and as such were not caught by the previous testing behavior.

Test Coverage

Tests currently fail, which is good because they're catching existing bugs. #576 will need to be merged before tests will pass again. For now, I've disabled the "doesn't touch text bubble" test because there are potential compatibility concerns I want to work out before fixing that (#577).

@adroitwhiz adroitwhiz force-pushed the cpu-gpu-integration-tests branch 2 times, most recently from 979c1db to 4d14729 Compare May 11, 2020 20:08
@adroitwhiz adroitwhiz force-pushed the cpu-gpu-integration-tests branch 2 times, most recently from 516bc84 to 59515c1 Compare May 12, 2020 19:47
adroitwhiz and others added 3 commits May 12, 2020 15:52
There are some compatibility concerns to be worked out before the
corresponding bug can be fixed.
Previously, the `color-touching-tests.sb2` test "touches a color that
doesn't actually exist right now" would use a sprite with ghost 50,
blended against another sprite, to create the color that "doesn't
actually exist" when the query sprite is skipped. Unfortunately the
blend result was near a bit-boundary and, depending on the specific
hardware used, that test could fail on the GPU. When the renderer uses
the CPU path this test works fine, though, so the existing problem went
unnoticed.

To fix the problem I changed the project to use ghost 30 instead, which
results in a color that is less near a bit boundary and is therefore
less likely to fail on specific hardware.

As an example of what was happening: the `touching color` block was
checking for `RGB(127,101,216)` with a mask of `RGB(0xF8,0xF8,0xF0)`. On
the CPU it would find `RGB(120,99,215)`, which is in range, but on some
GPUs the closest color it could find was `RGB(119,98,215)` which
mismatches on all four of the least significant bits -- one of which is
enabled in the mask.
@adroitwhiz adroitwhiz force-pushed the cpu-gpu-integration-tests branch from 59515c1 to 298200f Compare May 12, 2020 19:53
Copy link
Contributor

@cwillisf cwillisf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 approved pending successful automated tests on CI

@adroitwhiz adroitwhiz merged commit d73aeb1 into scratchfoundation:develop May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run tests on both the CPU and GPU again
3 participants