diff --git a/selftests/functional/test_replay_basic.py b/selftests/functional/test_replay_basic.py index 56f94d315f07d0d510495ce83ae86c526c74f4c8..6eb944aa2c564f1ec064ee470dcf4f09675271aa 100644 --- a/selftests/functional/test_replay_basic.py +++ b/selftests/functional/test_replay_basic.py @@ -1,9 +1,11 @@ import glob import os -import tempfile import shutil +import tempfile import unittest +import pkg_resources + from avocado.core import exit_codes from avocado.utils import process @@ -14,6 +16,14 @@ basedir = os.path.abspath(basedir) AVOCADO = os.environ.get("UNITTEST_AVOCADO_CMD", "./scripts/avocado") +def remote_capable(): + try: + pkg_resources.require('avocado-framework-plugin-runner-remote') + return True + except pkg_resources.DistributionNotFound: + return False + + class ReplayTests(unittest.TestCase): def setUp(self): @@ -148,6 +158,8 @@ class ReplayTests(unittest.TestCase): b'INTERRUPT 0') self.assertIn(msg, result.stdout) + @unittest.skipUnless(remote_capable(), + "Remote runner plugin is not available") def test_run_replay_remotefail(self): """ Runs a replay job using remote plugin (not supported).