Skip to content
Snippets Groups Projects
Commit ecce7dbb authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Added -b in tester args to run only basic tests.

parent a8204415
No related branches found
No related tags found
No related merge requests found
...@@ -35,8 +35,9 @@ sys.stderr = sys.stdout ...@@ -35,8 +35,9 @@ sys.stderr = sys.stdout
class Tester(): class Tester():
USAGE = '''%s [-e] [-d] [-h] USAGE = '''%s [-e] [-b] [-d] [-h]
-e: send email with report. -e: send email with report.
-b: run only basic tests (exclude mediaserver tests).
-d: debug mode (can be started with non root users). -d: debug mode (can be started with non root users).
-h: show this message.''' % __file__ -h: show this message.''' % __file__
...@@ -70,7 +71,8 @@ class Tester(): ...@@ -70,7 +71,8 @@ class Tester():
sys.exit(1) sys.exit(1)
# Check for email value # Check for email value
email = '-e' in args email = '-e' in args
tests = self.discover_tests() basic_only = '-b' in args
tests = self.discover_tests(basic_only)
if not tests: if not tests:
sys.exit(1) sys.exit(1)
exit_code = self.run_tests(tests, email) exit_code = self.run_tests(tests, email)
...@@ -97,7 +99,7 @@ class Tester(): ...@@ -97,7 +99,7 @@ class Tester():
break break
return description.strip() return description.strip()
def discover_tests(self): def discover_tests(self, basic_only=False):
tests = list() tests = list()
# Get standard tests # Get standard tests
path = os.path.join(self.root_dir, 'tests') path = os.path.join(self.root_dir, 'tests')
...@@ -114,6 +116,8 @@ class Tester(): ...@@ -114,6 +116,8 @@ class Tester():
if os.path.isfile(test_path): if os.path.isfile(test_path):
description = self.get_file_description(test_path) description = self.get_file_description(test_path)
tests.append((name, description, [test_path])) tests.append((name, description, [test_path]))
if basic_only:
return tests
# Get MS instances # Get MS instances
ms_users = list() ms_users = list()
for user in os.listdir('/home'): for user in os.listdir('/home'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment