mirror of
https://github.com/ohwgiles/laminar.git
synced 2024-10-27 20:34:20 +00:00
tests: add setNumExecutors method
This commit is contained in:
parent
4a6f99a203
commit
e581a0cf5d
@ -98,6 +98,14 @@ public:
|
|||||||
return { res.getResult(), kj::mv(log) };
|
return { res.getResult(), kj::mv(log) };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setNumExecutors(int nexec) {
|
||||||
|
KJ_IF_MAYBE(f, tmp.fs->tryOpenFile(kj::Path{"cfg", "contexts", "default.conf"},
|
||||||
|
kj::WriteMode::CREATE | kj::WriteMode::MODIFY | kj::WriteMode::CREATE_PARENT)) {
|
||||||
|
std::string content = "EXECUTORS=" + std::to_string(nexec);
|
||||||
|
(*f)->writeAll(content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
kj::String stripLaminarLogLines(const kj::String& str) {
|
kj::String stripLaminarLogLines(const kj::String& str) {
|
||||||
auto out = kj::heapString(str.size());
|
auto out = kj::heapString(str.size());
|
||||||
char *o = out.begin();
|
char *o = out.begin();
|
||||||
|
@ -38,6 +38,7 @@ public:
|
|||||||
// set up empty directory structure
|
// set up empty directory structure
|
||||||
fs->openSubdir(kj::Path{"cfg"}, kj::WriteMode::CREATE);
|
fs->openSubdir(kj::Path{"cfg"}, kj::WriteMode::CREATE);
|
||||||
fs->openSubdir(kj::Path{"cfg", "jobs"}, kj::WriteMode::CREATE);
|
fs->openSubdir(kj::Path{"cfg", "jobs"}, kj::WriteMode::CREATE);
|
||||||
|
fs->openSubdir(kj::Path{"cfg", "contexts"}, kj::WriteMode::CREATE);
|
||||||
}
|
}
|
||||||
void clean() {
|
void clean() {
|
||||||
// rm -rf in config folder
|
// rm -rf in config folder
|
||||||
|
Loading…
Reference in New Issue
Block a user