3 # jose.lausuch@ericsson.com
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # pylint: disable=missing-docstring
13 from functest.cli.commands import cli_tier
14 from functest.utils import functest_utils
17 class Testcase(cli_tier.Tier):
21 for tier in self.tiers.get_tiers():
22 for test in tier.get_tests():
23 summary += (" %s\n" % test.get_name())
27 description = self.tiers.get_test(name)
31 def run(name, noclean=False, report=False):
32 tests = name.split(",")
34 cmd = "run_tests {}-t {}".format(
35 Testcase.get_flags(noclean, report), test)
36 functest_utils.execute_command(cmd)
39 class CliTestcase(Testcase):
42 click.echo(super(CliTestcase, self).list())
45 testcase_show = super(CliTestcase, self).show(name)
47 click.echo(testcase_show)
49 click.echo("The test case '%s' does not exist or is not supported."