X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=tst%2Fintegration%2FTestInstance.cpp;h=df87bfd4146e6affd4894201182edd5ddf13b99f;hb=8368621fd8996569e3ca8fc6fd68ac0168742392;hp=135d17c02b0d9ce750742fd2f0c81473b8e06ebd;hpb=5408130b6267448d0fddf4e3001fdc4b915e6496;p=blank.git diff --git a/tst/integration/TestInstance.cpp b/tst/integration/TestInstance.cpp index 135d17c..df87bfd 100644 --- a/tst/integration/TestInstance.cpp +++ b/tst/integration/TestInstance.cpp @@ -10,13 +10,20 @@ namespace test { namespace { -Process::Arguments combine_args(const TempDir &dir, const Process::Arguments &in, bool cmd) { +Process::Arguments combine_args( + const TempDir &dir, + const Process::Arguments &in, + bool cmd, + bool temp_save +) { Process::Arguments out; out.reserve(in.size() + (cmd ? 5 : 3)); out.emplace_back("blank"); out.insert(out.end(), in.begin(), in.end()); - out.emplace_back("--save-path"); - out.emplace_back(dir.Path()); + if (temp_save) { + out.emplace_back("--save-path"); + out.emplace_back(dir.Path()); + } if (cmd) { out.emplace_back("--cmd-port"); out.emplace_back("12354"); @@ -26,9 +33,9 @@ Process::Arguments combine_args(const TempDir &dir, const Process::Arguments &in } -TestInstance::TestInstance(const Process::Arguments &args, bool cmd) +TestInstance::TestInstance(const Process::Arguments &args, bool cmd, bool temp_save) : dir() -, proc("./blank" BLANK_SUFFIX, combine_args(dir, args, cmd)) +, proc("./blank" BLANK_SUFFIX, combine_args(dir, args, cmd, temp_save)) , conn() , out_buf() , err_buf()