X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Fcompulsory_tests%2Frun_tests.c;h=e2ab9226964e4287ca4ba61289e56292f1f6b515;hp=52c5fb1041877f2e8daa4613b50bf9a14212c512;hb=09fde153ba7a68715dcad3b53cbbb8804c3d2356;hpb=304652023042670b3173de0ad5dc0eb7c836618c diff --git a/tools/ccanlint/compulsory_tests/run_tests.c b/tools/ccanlint/compulsory_tests/run_tests.c index 52c5fb10..e2ab9226 100644 --- a/tools/ccanlint/compulsory_tests/run_tests.c +++ b/tools/ccanlint/compulsory_tests/run_tests.c @@ -27,21 +27,14 @@ struct run_tests_result { const char *output; }; -static void *do_run_tests(struct manifest *m, unsigned int *timeleft) +static void *do_run_tests(struct manifest *m, + bool keep, + unsigned int *timeleft) { struct list_head *list = talloc(m, struct list_head); struct run_tests_result *res; struct ccan_file *i; char *cmdout; - 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); @@ -72,9 +65,6 @@ static void *do_run_tests(struct manifest *m, unsigned int *timeleft) list = NULL; } - if (chdir(olddir) != 0) - err(1, "Could not chdir to %s", olddir); - return list; }