- char *olddir;
-
- /* We run tests in the module directory, so any paths
- * referenced can all be module-local. */
- olddir = talloc_getcwd(m);
- if (!olddir)
- err(1, "Could not save cwd");
- if (chdir(m->dir) != 0)
- err(1, "Could not chdir to %s", m->dir);
-
- list_head_init(list);
-
- list_for_each(&m->run_tests, i, list) {
- run_tests.total_score++;
- /* FIXME: timeout here */
- cmdout = run_command(m, "valgrind -q %s", i->compiled);
- if (cmdout) {
- res = talloc(list, struct run_tests_result);
- res->file = i;
- res->output = talloc_steal(res, cmdout);
- list_add_tail(list, &res->list);
- }
- }