mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-24 11:20:10 +01:00
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.
18 lines
443 B
Perl
Executable file
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";
|