Skip to content
  • Pekka Paalanen's avatar
    tests: add scanner tests · c9f64544
    Pekka Paalanen authored
    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...
    c9f64544