From 2d8a9763d619a3e09d9c1046c116ec813d2199b7 Mon Sep 17 00:00:00 2001 From: Alex Savatieiev Date: Tue, 22 Aug 2023 19:20:36 -0500 Subject: [PATCH] ducktape: Same command line in resulst and add it to HTML report --- ducktape/command_line/main.py | 2 +- ducktape/templates/report/report.html | 4 +++- ducktape/tests/reporter.py | 1 + ducktape/tests/result.py | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ducktape/command_line/main.py b/ducktape/command_line/main.py index 8145c1830..4ff4ff613 100644 --- a/ducktape/command_line/main.py +++ b/ducktape/command_line/main.py @@ -173,7 +173,7 @@ def main(): # Run the tests runner = TestRunner(cluster, session_context, session_logger, tests) test_results = runner.run_all_tests() - + test_results.command_line = " ".join(sys.argv) # Report results reporters = [ SimpleStdoutSummaryReporter(test_results), diff --git a/ducktape/templates/report/report.html b/ducktape/templates/report/report.html index 786021bf1..12b262331 100644 --- a/ducktape/templates/report/report.html +++ b/ducktape/templates/report/report.html @@ -29,6 +29,7 @@

Test Session: {this.props.heading.session}

Ducktape Version: {this.props.heading.ducktape_version}

+

Command line: {this.props.heading.command_line}

); } @@ -190,7 +191,8 @@

{this.props.title}

HEADING={ "ducktape_version": '%(ducktape_version)s', - "session": '%(session)s' + "session": '%(session)s', + "command_line": '%(command_line)s' }; COLOR_KEYS=[%(test_status_names)s]; diff --git a/ducktape/tests/reporter.py b/ducktape/tests/reporter.py index 1fb7b1fc3..e8246d4e3 100644 --- a/ducktape/tests/reporter.py +++ b/ducktape/tests/reporter.py @@ -313,6 +313,7 @@ def format_report(self): args = { 'ducktape_version': ducktape_version(), + 'command_line': self.results.command_line, 'num_tests': num_tests, 'num_passes': self.results.num_passed, 'num_failures': self.results.num_failed, diff --git a/ducktape/tests/result.py b/ducktape/tests/result.py index 5573f6c53..9c75815eb 100644 --- a/ducktape/tests/result.py +++ b/ducktape/tests/result.py @@ -135,7 +135,7 @@ def __init__(self, session_context, cluster): self._results = [] self.session_context = session_context self.cluster = cluster - + self.command_line = "" # For tracking total run time self.start_time = -1 self.stop_time = -1