Skip to content

Commit

Permalink
ducktape: Same command line in resulst and add it to HTML report
Browse files Browse the repository at this point in the history
  • Loading branch information
savex committed Aug 23, 2023
1 parent fd01d72 commit 2d8a976
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ducktape/command_line/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 3 additions & 1 deletion ducktape/templates/report/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ <h1>
</h1>
<p>Test Session: {this.props.heading.session}</p>
<p>Ducktape Version: {this.props.heading.ducktape_version}</p>
<p>Command line: {this.props.heading.command_line}</p>
</div>
);
}
Expand Down Expand Up @@ -190,7 +191,8 @@ <h2>{this.props.title}</h2>

HEADING={
"ducktape_version": '%(ducktape_version)s',
"session": '%(session)s'
"session": '%(session)s',
"command_line": '%(command_line)s'
};

COLOR_KEYS=[%(test_status_names)s];
Expand Down
1 change: 1 addition & 0 deletions ducktape/tests/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion ducktape/tests/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d8a976

Please sign in to comment.