From ecce7dbb0c0344077e9d6d8dd6182d36ad987fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu> Date: Wed, 8 Feb 2017 13:59:36 +0100 Subject: [PATCH] Added -b in tester args to run only basic tests. --- tester.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tester.py b/tester.py index 3377accf..0a3d0cc3 100755 --- a/tester.py +++ b/tester.py @@ -35,8 +35,9 @@ sys.stderr = sys.stdout class Tester(): - USAGE = '''%s [-e] [-d] [-h] + USAGE = '''%s [-e] [-b] [-d] [-h] -e: send email with report. + -b: run only basic tests (exclude mediaserver tests). -d: debug mode (can be started with non root users). -h: show this message.''' % __file__ @@ -70,7 +71,8 @@ class Tester(): sys.exit(1) # Check for email value email = '-e' in args - tests = self.discover_tests() + basic_only = '-b' in args + tests = self.discover_tests(basic_only) if not tests: sys.exit(1) exit_code = self.run_tests(tests, email) @@ -97,7 +99,7 @@ class Tester(): break return description.strip() - def discover_tests(self): + def discover_tests(self, basic_only=False): tests = list() # Get standard tests path = os.path.join(self.root_dir, 'tests') @@ -114,6 +116,8 @@ class Tester(): if os.path.isfile(test_path): description = self.get_file_description(test_path) tests.append((name, description, [test_path])) + if basic_only: + return tests # Get MS instances ms_users = list() for user in os.listdir('/home'): -- GitLab