From d43998ea9975d1f4d2fc6922865e86525b7c7874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Mon, 4 Jul 2016 11:24:07 +0200 Subject: [PATCH] selftests: Skip partitions test when mkfs not available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This test requires mkfs binary in order to run, while it's not really essential for avocado testing. Let's skip it when it's not available. Signed-off-by: Lukáš Doktor --- selftests/unit/test_utils_partition.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/selftests/unit/test_utils_partition.py b/selftests/unit/test_utils_partition.py index 580d2bbb..26a11e40 100644 --- a/selftests/unit/test_utils_partition.py +++ b/selftests/unit/test_utils_partition.py @@ -26,6 +26,8 @@ class TestPartition(unittest.TestCase): Unit tests for avocado.utils.partition """ + @unittest.skipIf(process.system("which mkfs", ignore_status=True), + "mkfs is required for these tests to run.") def setUp(self): try: process.system("/bin/true", sudo=True) -- GitLab