Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devbot/plugins/debian.py3
-rw-r--r--tests/devbot/data/debian_version-wheezy1
-rw-r--r--tests/devbot/test_config.py19
3 files changed, 20 insertions, 3 deletions
diff --git a/devbot/plugins/debian.py b/devbot/plugins/debian.py
index 09f8abc..687ffad 100644
--- a/devbot/plugins/debian.py
+++ b/devbot/plugins/debian.py
@@ -84,6 +84,7 @@ class PackageManager(interfaces.PackageManager):
distro.register_package_manager("debian", PackageManager)
class DistroInfo(interfaces.DistroInfo):
+ _DEBIAN_VERSION_PATH = "/etc/debian_version"
def __init__(self):
arch = subprocess.check_output(["arch"]).strip()
@@ -96,7 +97,7 @@ class DistroInfo(interfaces.DistroInfo):
self.use_lib64 = False
try:
- with open("/etc/debian_version") as f:
+ with open(_DEBIAN_VERSION_PATH) as f:
debian_version = f.read()
except IOError:
debian_version = None
diff --git a/tests/devbot/data/debian_version-wheezy b/tests/devbot/data/debian_version-wheezy
new file mode 100644
index 0000000..743272a
--- /dev/null
+++ b/tests/devbot/data/debian_version-wheezy
@@ -0,0 +1 @@
+wheezy/sid
diff --git a/tests/devbot/test_config.py b/tests/devbot/test_config.py
index 3ffd90a..2c3f2fa 100644
--- a/tests/devbot/test_config.py
+++ b/tests/devbot/test_config.py
@@ -23,6 +23,10 @@ class TestConfig(unittest.TestCase):
info_class._FEDORA_RELEASE_PATH = \
os.path.join(data_dir, "fedora-release-18")
+ if "_DEBIAN_VERSION_PATH" in distro_info_class:
+ info_class._DEBIAN_VERSION_PATH = \
+ os.path.join(data_dir, "debian_version-wheezy")
+
info = info_class()
if info.name == name and info.version == version:
self._supported_distros = [info]
@@ -44,7 +48,7 @@ class TestConfig(unittest.TestCase):
def _assert_no_module(self, modules, name):
self.assertIsNotNone(self._find_module(modules, name))
- def test_fedora_17_info(self):
+ def test_fedora_17_modules(self):
self._set_distro("fedora", "17")
modules = config.load_modules()
@@ -55,7 +59,7 @@ class TestConfig(unittest.TestCase):
self._unset_distro()
- def test_fedora_18_info(self):
+ def test_fedora_18_modules(self):
self._set_distro("fedora", "18")
modules = config.load_modules()
@@ -65,3 +69,14 @@ class TestConfig(unittest.TestCase):
self._assert_module(modules, "sugar")
self._unset_distro()
+
+ def test_debian_wheezy_modules(self):
+ self._set_distro("debian", "wheezy")
+
+ modules = config.load_modules()
+ self._assert_module(modules, "glib")
+ self._assert_module(modules, "gtk+")
+ self._assert_module(modules, "gstreamer")
+ self._assert_module(modules, "sugar")
+
+ self._unset_distro()