Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue with 'buildtest report --pass' and 'buildtest report --fail' not filtering output correctly #1524

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions buildtest/cli/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,11 @@ def process_report(self):
# retrieve first record of every test if --oldest is specified
elif self.oldest:
tests = [self.report[buildspec][name][0]]
# retrieve all records of failure tests if --failure is specified
elif self.failure:
# retrieve all records of failure tests if --fail is specified
if self.failure:
tests = [test for test in tests if test["state"] == "FAIL"]
# retrieve all records of passed tests if --passed is specified
elif self.passed:
# retrieve all records of passed tests if --pass is specified
if self.passed:
tests = [test for test in tests if test["state"] == "PASS"]
# retrieve all records of tests filtered by start or end if --start and end are specified
elif self.start or self.end:
Expand Down
Loading