Skip to content

Commit

Permalink
e2e: mint: revert s3select
Browse files Browse the repository at this point in the history
  • Loading branch information
Nugine committed Jan 11, 2024
1 parent 48cff0b commit 057ca80
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions scripts/report-mint.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
from typing import Any, Dict, Optional
import json
import sys
from pprint import pprint
from pprint import pprint # noqa: F401
from itertools import groupby


# https://github.com/minio/mint#mint-log-format
@dataclass
class MintLog:
Expand Down Expand Up @@ -46,7 +47,7 @@ def from_json(x: Any) -> MintLog:

try:
json_value = json.loads(line)
except Exception as e:
except Exception:
print(f"error parsing log line: {line}")
continue

Expand All @@ -67,14 +68,24 @@ def from_json(x: Any) -> MintLog:
na_count = len(list(x for x in group if x.status == "NA"))
counts[name] = {"pass": pass_count, "fail": fail_count, "na": na_count}

print(f"{name:<20} passed {pass_count:>3}, failed {fail_count:>3}, na {na_count:>3}")
print(
f"{name:<20} "
f"passed {pass_count:>3}, "
f"failed {fail_count:>3}, "
f"na {na_count:>3}"
)
print()

total_pass_count = sum(c["pass"] for c in counts.values())
total_fail_count = sum(c["fail"] for c in counts.values())
total_na_count = sum(c["na"] for c in counts.values())
name = "summary"
print(f"{name:<20} passed {total_pass_count:>3}, failed {total_fail_count:>3}, na {total_na_count:>3}")
print(
f"{name:<20} "
f"passed {total_pass_count:>3}, "
f"failed {total_fail_count:>3}, "
f"na {total_na_count:>3}"
)

passed_groups = [
"aws-sdk-go",
Expand All @@ -84,7 +95,6 @@ def from_json(x: Any) -> MintLog:
"minio-go",
"minio-py",
"s3cmd",
"s3select",
]

for group in passed_groups:
Expand All @@ -99,3 +109,4 @@ def from_json(x: Any) -> MintLog:
assert "minio-dotnet" not in counts
assert counts["minio-js"]["pass"] >= 219
assert counts["versioning"]["pass"] >= 4
assert "s3select" not in counts

0 comments on commit 057ca80

Please sign in to comment.