cairo/test/make-cairo-test-constructors.pl
Chris Wilson e90073f7dd [test] Build test suite into single binary.
Avoid calling libtool to link every single test case, by building just one
binary from all the sources.

This binary is then given the task of choosing tests to run (based on user
selection and individual test requirement), forking each test into its own
process and accumulating the results.
2008-10-31 12:30:11 +00:00

18 lines
443 B
Perl
Executable file

#!/usr/bin/perl -w
while (<>) {
next unless /CAIRO_TEST \((.*),/; # XXX Parse multi-line macro
push @names, $1;
}
print <<EOD
/* WARNING: Autogenerated file - see make-cairo-test-constructors.pl! */
#include "cairo-test-private.h"
EOD
;
print "extern void _register_$_ (void);\n" foreach (@names);
print "\nvoid\n_cairo_test_runner_register_tests (void)\n{\n";
print " _register_$_ ();\n" foreach (reverse @names);
print "}\n";