Skip debian tests on non-debian systems.

This commit is contained in:
Jelmer Vernooij 2021-05-17 18:42:59 +01:00
parent 7b2f565a11
commit f338e67b0a
2 changed files with 3 additions and 3 deletions

View file

@ -17,14 +17,16 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
import os
import unittest
def test_suite():
names = [
"debian_build",
"debian_fix_build",
]
if os.path.exists("/usr/bin/dpkg-architecture"):
names.append("debian_fix_build")
module_names = ["ognibuild.tests.test_" + name for name in names]
loader = unittest.TestLoader()
return loader.loadTestsFromNames(module_names)

View file

@ -65,8 +65,6 @@ class DummyAptSearcher(FileSearcher):
class ResolveErrorTests(TestCaseWithTransport):
def setUp(self):
super(ResolveErrorTests, self).setUp()
if not os.path.exists("/usr/bin/dpkg-architecture"):
self.skipTest("not a debian system")
self.tree = self.make_branch_and_tree(".")
self.build_tree_contents(
[