X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fconfigurator%2Fconfigurator.c;h=0252fc1ce8901992649cf8a80ffcaf6684bf153f;hp=e322c76c72254f2f6089e0e5173978eaededd24d;hb=3c95fa61256fc559c2cd235caee10046e7464b68;hpb=891b43ea4b6d09db68ee83f7086b5673e2806733 diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index e322c76c..0252fc1c 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -38,6 +38,12 @@ #define OUTPUT_FILE "configurator.out" #define INPUT_FILE "configuratortest.c" +#ifdef _WIN32 +#define DIR_SEP "\\" +#else +#define DIR_SEP "/" +#endif + static int verbose; enum test_style { @@ -585,7 +591,7 @@ static bool run_test(const char *cmd, struct test *test) free(output); /* We run INSIDE_MAIN tests for sanity checking. */ if ((test->style & EXECUTE) || (test->style & INSIDE_MAIN)) { - output = run("./" OUTPUT_FILE, &status); + output = run("." DIR_SEP OUTPUT_FILE, &status); if (!(test->style & EXECUTE) && status != 0) errx(1, "Test for %s failed with %i:\n%s", test->name, status, output);