diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-03 21:22:18 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-03 21:22:18 (GMT) |
commit | 4c91925231328c47696fe8219da0b34779634847 (patch) | |
tree | b9957a747629561db204aba3c18a33ccebf207f7 /devbot | |
parent | 96d10a665b90a0ca0419cc4e074aa55aac4a54e2 (diff) |
Rename env to display
Diffstat (limited to 'devbot')
-rw-r--r-- | devbot/run.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/devbot/run.py b/devbot/run.py index 930cd42..7617909 100644 --- a/devbot/run.py +++ b/devbot/run.py @@ -30,26 +30,24 @@ def run_test(command, test_path, virtual=False): environ.setup() temp_dir = tempfile.mkdtemp("sugar-build-test") - env_path = os.path.join(temp_dir, "environment") + display_path = os.path.join(temp_dir, "display") - args = [command, "--env-path", env_path] + args = [command, "--display-path", display_path] if virtual: args.append("--virtual") command_process = subprocess.Popen(args, stdout=subprocess.PIPE) while True: - if not os.path.exists(env_path): + if not os.path.exists(display_path): time.sleep(1) else: break - with open(env_path) as f: - for line in f.readlines(): - name, value = line.split("=", 1) - os.environ[name.strip()] = value.strip() + with open(display_path) as f: + os.environ["DISPLAY"] = f.read() - os.unlink(env_path) + os.unlink(display_path) os.rmdir(temp_dir) try: |