Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-28 02:07:48 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-11-28 02:07:48 (GMT)
commit0b506befd616219621a968e2a51bab9b254299d8 (patch)
treea0d6110c6c4d2fa4b5e89bf2e95c989da6d3124f /commands
parentd032214da568917663d3c2aa515214cf30664f26 (diff)
Don't hardcode xvfb display
Diffstat (limited to 'commands')
-rw-r--r--commands/common.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/commands/common.py b/commands/common.py
index b26e192..118716e 100644
--- a/commands/common.py
+++ b/commands/common.py
@@ -1,5 +1,6 @@
import os
import sys
+import subprocess
base_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
helpers_dir = os.path.join(base_dir, "commands", "helpers")
@@ -9,6 +10,13 @@ sys.path.append(base_dir)
from devbot import system
from devbot import config
from devbot import distro
+from devbot import xvfb
+
+class _DisplayProvider:
+ def find_free_display(self):
+ helper_path = os.path.join(config.libexec_dir,
+ "sugar-runner", "find-free-display")
+ return subprocess.check_output([helper_path])
def setup():
config.load_plugins()
@@ -52,3 +60,5 @@ def setup():
package_files.append("buildslave")
config.set_package_files(package_files)
+
+ xvfb.set_display_provider(_DisplayProvider())