forked from lix-project/lix
Pass verbosity level to build hook
This commit is contained in:
parent
227a48f86f
commit
b986c7f8b1
|
@ -130,14 +130,15 @@ int main (int argc, char * * argv)
|
||||||
putenv(ssh_env) == -1)
|
putenv(ssh_env) == -1)
|
||||||
throw SysError("setting SSH env vars");
|
throw SysError("setting SSH env vars");
|
||||||
|
|
||||||
if (argc != 4)
|
if (argc != 5)
|
||||||
throw UsageError("called without required arguments");
|
throw UsageError("called without required arguments");
|
||||||
|
|
||||||
auto store = openStore();
|
auto store = openStore();
|
||||||
|
|
||||||
auto localSystem = argv[1];
|
auto localSystem = argv[1];
|
||||||
settings.maxSilentTime = stoull(string(argv[2]));
|
settings.maxSilentTime = std::stoll(argv[2]);
|
||||||
settings.buildTimeout = stoull(string(argv[3]));
|
settings.buildTimeout = std::stoll(argv[3]);
|
||||||
|
verbosity = (Verbosity) std::stoll(argv[4]);
|
||||||
|
|
||||||
currentLoad = getEnv("NIX_CURRENT_LOAD", "/run/nix/current-load");
|
currentLoad = getEnv("NIX_CURRENT_LOAD", "/run/nix/current-load");
|
||||||
|
|
||||||
|
@ -145,6 +146,8 @@ int main (int argc, char * * argv)
|
||||||
AutoCloseFD bestSlotLock;
|
AutoCloseFD bestSlotLock;
|
||||||
|
|
||||||
auto machines = readConf();
|
auto machines = readConf();
|
||||||
|
debug("got %d remote builders", machines.size());
|
||||||
|
|
||||||
string drvPath;
|
string drvPath;
|
||||||
string hostName;
|
string hostName;
|
||||||
for (string line; getline(cin, line);) {
|
for (string line; getline(cin, line);) {
|
||||||
|
|
|
@ -614,10 +614,11 @@ HookInstance::HookInstance()
|
||||||
throw SysError("dupping builder's stdout/stderr");
|
throw SysError("dupping builder's stdout/stderr");
|
||||||
|
|
||||||
Strings args = {
|
Strings args = {
|
||||||
baseNameOf(buildHook),
|
baseNameOf(settings.buildHook),
|
||||||
settings.thisSystem,
|
settings.thisSystem,
|
||||||
(format("%1%") % settings.maxSilentTime).str(),
|
std::to_string(settings.maxSilentTime),
|
||||||
(format("%1%") % settings.buildTimeout).str()
|
std::to_string(settings.buildTimeout),
|
||||||
|
std::to_string(verbosity)
|
||||||
};
|
};
|
||||||
|
|
||||||
execv(buildHook.c_str(), stringsToCharPtrs(args).data());
|
execv(buildHook.c_str(), stringsToCharPtrs(args).data());
|
||||||
|
|
Loading…
Reference in a new issue