diff options
author | Ryszard Knop <ryszard.knop@intel.com> | 2022-08-08 17:03:21 +0200 |
---|---|---|
committer | Ryszard Knop <ryszard.knop@intel.com> | 2022-08-31 13:05:12 +0200 |
commit | 1e8c7ae5df177f41dcf0b45889fc9d42e1974aee (patch) | |
tree | a1c0b072d0239561c8d86a57912192ef959033f1 /runner | |
parent | f3d848a0b578f73db75516e979b7a905b86732ed (diff) |
runner: Set requested env vars during execution
v2: Removed unnecessary checks, misc cleanup (Mauro)
Diffstat (limited to 'runner')
-rw-r--r-- | runner/executor.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runner/executor.c b/runner/executor.c index 9b89cc095..964d00630 100644 --- a/runner/executor.c +++ b/runner/executor.c @@ -1860,10 +1860,10 @@ bool execute(struct execute_state *state, struct settings *settings, struct job_list *job_list) { + int resdirfd, testdirfd, unamefd, timefd, sigfd; + struct environment_variable *env_var; struct utsname unamebuf; - int resdirfd, testdirfd, unamefd, timefd; sigset_t sigmask; - int sigfd; double time_spent = 0.0; bool status = true; @@ -1872,6 +1872,10 @@ bool execute(struct execute_state *state, return true; } + igt_list_for_each_entry(env_var, &settings->env_vars, link) { + setenv(env_var->key, env_var->value, 1); + } + if ((resdirfd = open(settings->results_path, O_DIRECTORY | O_RDONLY)) < 0) { /* Initialize state should have done this */ errf("Error: Failure opening results path %s\n", |