[PATCH wayland v2 3/3] tests: add scanner tests
ppaalanen at gmail.com
Wed Nov 23 08:25:48 UTC 2016
On Tue, 22 Nov 2016 07:46:16 -0800
Yong Bakos <junk at humanoriented.com> wrote:
> Hi Pekka,
> > On Nov 16, 2016, at 3:38 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > Add tests that ensure that wayland-scanner output for a given input does
> > not change unexpectedly. This makes it very easy to review
> > wayland-scanner patches.
> > Before, when patches were proposed for wayland-scanner, I had to
> > build wayland without the patches, save the generated files into a
> > temporary directory, apply the patches, build again, and diff the old
> > vs. new generated file.
> > No more. Now whenever someone makes intentional changes to
> > wayland-scanner's output, he will also have to patch the example output
> > files to match. That means that reviewers see the diff of the generated
> > files straight from the patch itself. Verifying the diff is true is as
> > easy as 'make check'.
> > The tests use separate example XML files instead of wayland.xml
> > directly, so that wayland.xml can be updated without fixing scanner
> > tests, avoiding the churn.
> > example.xml starts as a copy of wayland.xml. If wayland.xml starts using
> > new wayland-scanner features, they should be copied into example.xml
> > again to be covered by the tests.
> > This patch relies on the previous patch to actually add all the data
> > files for input and reference output.
> > The scanner output is fed through sed to remove parts that are allowed
> > to vary: the scanner version string.
> > v2: no need for scanner-test.sh to depend on the test data
> > Task: https://phabricator.freedesktop.org/T3313
> > Cc: Emilio Pozuelo Monfort <emilio.pozuelo at collabora.co.uk>
> > Cc: Yong Bakos <ybakos at humanoriented.com>
> > Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> This is an awesome addition to the tests for scanner. I modified different
> aspects of the scanner output and the expected workflow of needing to
> also change the corresponding tests/data files seems to work well. I could
> not find any issues with this, so, from where I sit, this is:
> Reviewed-by: Yong Bakos <ybakos at humanoriented.com>
> Tested-by: Yong Bakos <ybakos at humanoriented.com>
> Thank you,
> > ---
> > .gitignore | 1 +
> > Makefile.am | 29 ++++++++++++++++++++++++++++-
> > tests/scanner-test.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
> > 3 files changed, 80 insertions(+), 1 deletion(-)
> > create mode 100755 tests/scanner-test.sh
both patches pushed:
0242007..c9f6454 master -> master
Yong, I added your Acked-by to the data set patch, since I wasn't sure
if you meant R-b for that too or not, and going through all the data
would be quite much anyway. I hope that's ok. I also added a mention of
which Wayland revision the wayland.xml->example.xml is from, since
wayland.xml has changed already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 801 bytes
Desc: OpenPGP digital signature
More information about the wayland-devel