* execution this takes more work since a task needs to be generated
* from thin air and executed INLINE.
*/
+#include <math.h>
void task_schedualize(size_t *pad) {
bool execute = false;
char *data = NULL;
char **match = NULL;
size_t size = 0;
- size_t i;
- size_t j;
+ size_t i = 0;
+ size_t j = 0;
- util_debug("TEST", "found %d tasks, preparing to execute\n", vec_size(task_tasks));
+ for (; i < vec_size(task_tasks); i++) {
+ con_out("test #%u %*s", i + 1, (int)log10(vec_size(task_tasks)) - (int)(log10(i + 1)), "");
- for (i = 0; i < vec_size(task_tasks); i++) {
util_debug("TEST", "executing task: %d: %s\n", i, task_tasks[i].tmpl->description);
/*
* Generate a task from thin air if it requires execution in
}
if (!task_tasks[i].compiled && strcmp(task_tasks[i].tmpl->proceduretype, "-fail")) {
- con_err("test failure: `%s` (failed to compile) see %s.stdout and %s.stderr [%s]\n",
+ con_err("failure: `%s` (failed to compile) see %s.stdout and %s.stderr [%s]\n",
task_tasks[i].tmpl->description,
task_tasks[i].tmpl->tempfilename,
task_tasks[i].tmpl->tempfilename,
}
if (!execute) {
- con_out("test succeeded: `%s` %*s\n",
+ con_out("succeeded: `%s` %*s\n",
task_tasks[i].tmpl->description,
(pad[0] + pad[1] - strlen(task_tasks[i].tmpl->description)) +
(strlen(task_tasks[i].tmpl->rulesfile) - pad[1]),
if (!task_execute(task_tasks[i].tmpl, &match)) {
size_t d = 0;
- con_err("test failure: `%s` (invalid results from execution) [%s]\n",
+ con_err("failure: `%s` (invalid results from execution) [%s]\n",
task_tasks[i].tmpl->description,
task_tasks[i].tmpl->rulesfile
);
mem_d(match[j]);
vec_free(match);
- con_out("test succeeded: `%s` %*s\n",
+ con_out("succeeded: `%s` %*s\n",
task_tasks[i].tmpl->description,
(pad[0] + pad[1] - strlen(task_tasks[i].tmpl->description)) +
(strlen(task_tasks[i].tmpl->rulesfile) - pad[1]),