tests: Generate the stub scripts using sed
authorNeil Roberts <neil@linux.intel.com>
Mon, 11 Oct 2010 15:16:45 +0000 (16:16 +0100)
committerNeil Roberts <neil@linux.intel.com>
Tue, 12 Oct 2010 14:24:32 +0000 (15:24 +0100)
commit7fd6273c25569fe4f37ad371532d93e5170e51f7
tree1132a545bf41fea16254e1eb43a72e7d640b8358
parent100d541f479d070660905fa763b625853f17bfee
tests: Generate the stub scripts using sed

Instead of trying to run ./test-conformance with the -l option to
generate a list of available tests it now runs sed on the
test-conform-main.c file instead. Running the generated executable is
a pain for cross-compiling so it would be nice to avoid it unless it's
absolutely necessary. Although you could tell people who are cross
compiling to just disable the conformance tests, this seems a shame
because they could still be useful along with the wrappers for example
if the cross compile is built to a shared network folder where the
tests can be run on the actual device.

The sed script is a little more ugly than it could be because it tries
to avoid using the GNU extensions '\+' and '\|'.

The script ends up placing restrictions on the format of the C file
because the tests must all be listed on one line each. There is now a
comment to explain this. Hopefully the trade off is worth it.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2363
tests/conform/Makefile.am
tests/conform/test-conform-main.c