csyonghe / Spire

Other
174 stars 22 forks source link

Initial version of a "test runner". #49

Closed tangent-vector closed 7 years ago

tangent-vector commented 7 years ago

The basic process for running tests right now is:

The flow of the current test runner is:

When a test fails the user can then manually diff the foo.spire.expected and foo.spire.actual files to diagnose the issue.

This is only a very basic first pass, and needs a lot of tweaking to get the policy right as we add more tests. In particular, we'll need a plan for how to properly compare expected GLSL/HLSL output without getting bogged down every time we make a formatting change. We also need an eventual plan for end-to-end runnable tests (that produce images).

Getting to this basic step took longer than expected simply because I started out doing my own implementation of all the platform-specific code that the test runner needed, rather than use CoreLib. I got that version working, but decided it was better to just use CoreLib for now, and then refactor it to be closer to what we want long term bit by bit (which will be easier to do once we have some decent regression tests in place).