Commit 06909ab8 authored by Luis Araujo's avatar Luis Araujo

Rename the analyse command to new name report

This is a more accurate name for such a command. This commit also
updates the test unit to use the new name.
parent 9f1384a1
...@@ -88,12 +88,12 @@ class StatusCliTestCase(CliTestCase): ...@@ -88,12 +88,12 @@ class StatusCliTestCase(CliTestCase):
with self.assertRaises(SystemExit): with self.assertRaises(SystemExit):
self.cli._parse_args(["status"]) self.cli._parse_args(["status"])
class AnalyseCliTestCase(CliTestCase): class ReportCliTestCase(CliTestCase):
@redirect_stderr @redirect_stderr
def test_cli_analyse_requires_args(self): def test_cli_report_requires_args(self):
with self.assertRaises(SystemExit): with self.assertRaises(SystemExit):
self.cli._parse_args(["analyse"]) self.cli._parse_args(["report"])
class ResultsCliTestCase(CliTestCase): class ResultsCliTestCase(CliTestCase):
......
...@@ -183,18 +183,19 @@ class Cli(object): ...@@ -183,18 +183,19 @@ class Cli(object):
help="save test attachments to DIR") help="save test attachments to DIR")
test_parser.set_defaults(func=test) test_parser.set_defaults(func=test)
# Analyse # Report
analyse_parser = subparsers.add_parser('analyse', help="Analyse results" report_parser = subparsers.add_parser('report', help="Generate report"
" for job id") " for job id's")
analyse_parser.add_argument('job_ids', nargs='+', type=str, report_parser.add_argument('job_ids', nargs='+', type=str,
metavar='JOB_ID', help="job id to analyse") metavar='JOB_ID',
analyse_parser.add_argument('-a', '--all-results', action='store_true', help="job id to generate report")
help="expand and show all test results (not " report_parser.add_argument('-a', '--all-results', action='store_true',
"only failed results)") help="expand and show all test results (not "
analyse_parser.add_argument('-n', '--no-limit', action='store_true', "only failed results)")
help="ignore the number limit (set to 500) to " report_parser.add_argument('-n', '--no-limit', action='store_true',
"show test results") help="ignore the number limit (set to 500) to "
analyse_parser.set_defaults(func=analyse) "show test results")
report_parser.set_defaults(func=report)
# Results # Results
results_parser = subparsers.add_parser('results', help="Get (raw) results") results_parser = subparsers.add_parser('results', help="Get (raw) results")
...@@ -284,9 +285,9 @@ def test(args): ...@@ -284,9 +285,9 @@ def test(args):
from lqa_tool.commands.test import TestCmd from lqa_tool.commands.test import TestCmd
TestCmd(args).run() TestCmd(args).run()
def analyse(args): def report(args):
from lqa_tool.commands.analyse import AnalyseCmd from lqa_tool.commands.report import ReportCmd
AnalyseCmd(args).run() ReportCmd(args).run()
def results(args): def results(args):
from lqa_tool.commands.results import ResultsCmd from lqa_tool.commands.results import ResultsCmd
......
...@@ -29,7 +29,7 @@ from lqa_tool.settings import lqa_logger ...@@ -29,7 +29,7 @@ from lqa_tool.settings import lqa_logger
from lqa_tool.commands import Command from lqa_tool.commands import Command
from lqa_tool.version import __version__ from lqa_tool.version import __version__
class AnalyseCmd(Command): class ReportCmd(Command):
"""Sub-command to generate a LAVA lqa report""" """Sub-command to generate a LAVA lqa report"""
def __init__(self, args): def __init__(self, args):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment