diff options
Diffstat (limited to 'meta/lib/oeqa/utils')
-rw-r--r-- | meta/lib/oeqa/utils/commands.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 418643a1a6..4f79d15bb8 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
@@ -261,3 +261,15 @@ def runqemu(pn, ssh=True): | |||
261 | qemu.stop() | 261 | qemu.stop() |
262 | except: | 262 | except: |
263 | pass | 263 | pass |
264 | |||
265 | def updateEnv(env_file): | ||
266 | """ | ||
267 | Source a file and update environment. | ||
268 | """ | ||
269 | |||
270 | cmd = ". %s; env -0" % env_file | ||
271 | result = runCmd(cmd) | ||
272 | |||
273 | for line in result.output.split("\0"): | ||
274 | (key, _, value) = line.partition("=") | ||
275 | os.environ[key] = value | ||