Overhaul test suite
authorRan Benita <ran234@gmail.com>
Fri, 30 Mar 2012 23:44:39 +0000 (02:44 +0300)
committerDaniel Stone <daniel@fooishbar.org>
Mon, 9 Apr 2012 13:21:47 +0000 (14:21 +0100)
commit4b49e0a117efe652c97afdd585ab899e0a6b9189
tree82a568fd52404edb6068e6640f1d97fdede7aaa1
parentb1e49ff98058e5999cb503ec79ce7223485caac4
Overhaul test suite

Rewrite all of the current tests in the following ways:
- Instead of the current mix of C and shell, just use single-process
  pure C file per test. All of the .sh files are removed, but everything
  that was tested is ported.
- Instead of handling the test logs ourselves, use Automake's
  "parallel-test" mechanism. This will create a single log file for each
  test with it's stdout+stderr, and a top level "test-suite.log" file
  for all the failed tests.
- The "parallel-tests" directive also makes the test run in parallel,
  so "make check" runs faster.
- Also use the "color-tests" directive to have the "make check" output
  colorized. Who doesn't like to see PASS in green?
- All of the test data files are moved into the test/data subdirectory.
  That way we can just put the directory in EXTRA_DIST and forget about
  it.
- The test/Makefile.am file is consolidated into the main Makefile.am,
  for a completely non-recursive build.

Right now the tests are completely independent and just use simple
assert()'s. More sophistication can be added as needed.

It should also be noted that it's still possible to use shell, python,
etc. if a test wants more flexibility than C can provide, just do as
before.

Signed-off-by: Ran Benita <ran234@gmail.com>
[daniels: Updated for xkb_keymap changes.]
21 files changed:
.gitignore
Makefile.am
configure.ac
test/Makefile.am [deleted file]
test/canonicalise.c
test/canonicalise.sh [deleted file]
test/context.c
test/context.sh [deleted file]
test/data/bad.xkb [moved from test/bad.xkb with 100% similarity]
test/data/basic.xkb [moved from test/basic.xkb with 100% similarity]
test/data/comprehensive-plus-geom.xkb [moved from test/comprehensive-plus-geom.xkb with 100% similarity]
test/data/default.xkb [moved from test/default.xkb with 100% similarity]
test/filecomp.c
test/namescomp.c
test/namescomp.sh [deleted file]
test/rulescomp.c
test/rulescomp.sh [deleted file]
test/state.c
test/state.sh [deleted file]
test/xkey.c
test/xkey.sh [deleted file]