Initial preprocessor procedure option for testsuite implemented.

This commit is contained in:
Dale Weiler 2013-04-21 06:20:17 +00:00
parent ea0e2c47d5
commit 79282bfee0

18
test.c
View file

@ -894,6 +894,7 @@ bool task_execute(task_template_t *tmpl, char ***line) {
char buffer[4096];
memset (buffer,0,sizeof(buffer));
if (strcmp(tmpl->proceduretype, "-pp")) {
/*
* Drop the execution flags for the QCVM if none where
* actually specified.
@ -919,6 +920,14 @@ bool task_execute(task_template_t *tmpl, char ***line) {
execute = popen(buffer, "r");
if (!execute)
return false;
} else {
/*
* we're preprocessing, which means we need to read int
* the produced file and do some really weird shit.
*/
if (!(execute = fs_file_open(tmpl->tempfilename, "r")))
return false;
}
/*
* Now lets read the lines and compare them to the matches we expect
@ -965,7 +974,12 @@ bool task_execute(task_template_t *tmpl, char ***line) {
mem_d(data);
data = NULL;
}
if (strcmp(tmpl->proceduretype, "-pp"))
pclose(execute);
else
fs_file_close(execute);
return success;
}
@ -1055,6 +1069,10 @@ void task_schedualize(size_t *pad) {
continue;
}
if (!strcmp(task_tasks[i].tmpl->proceduretype, "-pp")) {
/* this is a pain */
}
if (!execute) {
con_out("succeeded: `%s` %*s %*s\n",
task_tasks[i].tmpl->description,