summaryrefslogtreecommitdiff
path: root/test/make-cairo-test-constructors.sh
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-08-06 09:41:15 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-08-06 10:11:32 +0100
commit51bd27afa147f78c8f4f3778cee725b6444e7eb0 (patch)
tree8adad0c6c053ce285ab29ec191f329535438e23c /test/make-cairo-test-constructors.sh
parent5dd29d7e2da8684ea46c8f1baba42e6dc64f1351 (diff)
downloadcairo-51bd27afa147f78c8f4f3778cee725b6444e7eb0.tar.gz
[boilerplate/test] Convert make-*-constructors to shell
Remove the intermediate C program that was a nuisance whilst cross-compiling and replace it with a simple shell script that is just a combination of cat + sed.
Diffstat (limited to 'test/make-cairo-test-constructors.sh')
-rw-r--r--test/make-cairo-test-constructors.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/make-cairo-test-constructors.sh b/test/make-cairo-test-constructors.sh
new file mode 100644
index 000000000..d0325e876
--- /dev/null
+++ b/test/make-cairo-test-constructors.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+cat <<HERE
+/* WARNING: Autogenerated file - see $0! */
+
+#include "cairo-test-private.h"
+
+void _cairo_test_runner_register_tests (void);
+
+HERE
+
+cat "$@" | sed '/^CAIRO_TEST/!d; s/CAIRO_TEST.*(\(.*\),.*/extern void _register_\1 (void);/'
+cat <<HERE
+
+void
+_cairo_test_runner_register_tests (void)
+{
+HERE
+
+cat "$@" | sed '/^CAIRO_TEST/!d; s/CAIRO_TEST.*(\(.*\),.*/ _register_\1 ();/'
+
+echo "}"
+
+