From 4c91925231328c47696fe8219da0b34779634847 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Mon, 03 Dec 2012 21:22:18 +0000 Subject: Rename env to display --- (limited to 'devbot') 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: -- cgit v0.9.1