summaryrefslogtreecommitdiff
path: root/test/cxxfilt/ts/common/gen.awk
diff options
context:
space:
mode:
Diffstat (limited to 'test/cxxfilt/ts/common/gen.awk')
-rwxr-xr-xtest/cxxfilt/ts/common/gen.awk33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/cxxfilt/ts/common/gen.awk b/test/cxxfilt/ts/common/gen.awk
new file mode 100755
index 0000000000000..9aa8973659b78
--- /dev/null
+++ b/test/cxxfilt/ts/common/gen.awk
@@ -0,0 +1,33 @@
+#!/usr/bin/awk -f
+#
+# $Id$
+
+BEGIN {
+ FS = "\""
+ tp = 0
+ print "#!/bin/sh\n"
+}
+
+{
+ sub(/#.*/, "");
+ if (NF >= 5) {
+ tp++
+ printf("tp%d()\n{\n run \"%s\" \"%s\"\n}\n\n", tp, $2, $4);
+ }
+}
+
+END {
+ print "tet_startup=\"\""
+ print "tet_cleanup=\"\"\n"
+ printf("%s", "iclist=\"");
+ for (i = 1; i <= tp; i++) {
+ printf("ic%d", i);
+ if (i != tp)
+ printf(" ");
+ }
+ printf("\"\n\n");
+ for (i = 1; i <= tp; i++)
+ printf("ic%d=\"tp%d\"\n", i, i);
+ print "\n. $TET_SUITE_ROOT/ts/common/func.sh";
+ print ". $TET_ROOT/lib/xpg3sh/tcm.sh";
+}