diff --git a/tests/test_cli.c b/tests/test_cli.c index 4d8c76d..55cc7a4 100644 --- a/tests/test_cli.c +++ b/tests/test_cli.c @@ -136,6 +136,14 @@ main(void) return 1; setenv("SPLINTER_CLI_CMD", "sed 's/^/X: /'", 1); + /* + * A real cooldown file for "cli" in ~/.splinter/cooldown would bench this + * transport before it ever runs, and the test would report a broken + * transport. Every host here gets its own empty cooldown directory. + */ + snprintf(tdir, sizeof(tdir), "/tmp/splinter-cli-cool-XXXXXX"); + if (mkdtemp(tdir) != NULL) + setenv("SPLINTER_COOLDOWN_DIR", tdir, 1); host = sp_host_new(®, &ag, NULL); CHECK(host != NULL); CHECK(sp_plugin_load(host, "plugins/cli/cli.so", &err) == 0);