summaryrefslogtreecommitdiff
path: root/source/aparser/harness.awk
diff options
context:
space:
mode:
Diffstat (limited to 'source/aparser/harness.awk')
-rw-r--r--source/aparser/harness.awk19
1 files changed, 14 insertions, 5 deletions
diff --git a/source/aparser/harness.awk b/source/aparser/harness.awk
index 00e3f44a682..f63863d6385 100644
--- a/source/aparser/harness.awk
+++ b/source/aparser/harness.awk
@@ -1,13 +1,22 @@
function produce_harness(f,
- LOCAL, v, struct_num)
+ LOCAL, v, struct_num, i)
{
struct_num=structs[test];
v["MODULE"]=module;
- v["TEST"]=test;
- v["TEST_FUNC"]=moduletest;
- v["STRUCTNAME"] = structs[struct_num, "name"];
- v["FUNCNAME"] = "io_" v["STRUCTNAME"];
print_template(f, "harness_start.tpl", v);
+
+ for (i=0;i<num_tests;i++) {
+ v["TEST"] = tests[i];
+ print_template(f, "harness.tpl", v);
+ }
+
+ print_template(f, "harness_end.tpl", v);
+}
+
+function add_test(test)
+{
+ tests[num_tests] = test;
+ num_tests++;
}