OSDN Git Service

glsl/glcpp: Add test script for testing various line-termination characters
authorCarl Worth <cworth@cworth.org>
Thu, 3 Jul 2014 00:14:51 +0000 (17:14 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 7 Aug 2014 23:08:29 +0000 (16:08 -0700)
commitf4ddd026c6f155a1050b142f2e88225305ecdd90
tree687441640e7851c18fc2bf1675f2308ddd131cc2
parent218e878b5491210dd0bc27a9171f88fa23278f4e
glsl/glcpp: Add test script for testing various line-termination characters

The GLSL specification has a very broad definition of what is a
newline. Namely, it can be the carriage-return character, '\r', the newline
character, '\n', or any combination of the two, (though in combination, the
two are treated as a single newline).

Here, we add a new test-runner, glcpp-test-cr-lf, that, for each possible
line-termination combination, runs through the existing test suite with all
source files modified to use those line-termination characters. Instead of
using the .expected files for this, this script assumes that the regular test
suite has been run already and expects the output to match the .out
files. This avoids getting 4 test failures for any one bug, and instead will
hopefully only report bugs actually related to the line-termination
characters.

The new testing is not yet integrated into "make check". For that, some
munging of the testdir option will be necessary, (to support "make check" with
out-of-tree builds). For now, the scripts can just be run directly by hand.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/glcpp/tests/glcpp-test
src/glsl/glcpp/tests/glcpp-test-cr-lf [new file with mode: 0755]