mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use ruff
to enforce python code formatting (#37117)
Requires servo/servo#37045 for deps and config. Testing: No need for tests to test tests. Fixes: servo/servo#37041 --------- Signed-off-by: zefr0x <zer0-x.7ty50@aleeas.com>
This commit is contained in:
parent
41ecfb53a1
commit
c96de69e80
67 changed files with 3021 additions and 3085 deletions
|
@ -45,9 +45,7 @@ def process_log(data):
|
|||
elif entry["action"] == "test_end":
|
||||
test = tests[entry["test"]]
|
||||
test["end"] = int(entry["time"])
|
||||
test_results[entry["status"]] += [
|
||||
(entry["test"], test["end"] - test["start"])
|
||||
]
|
||||
test_results[entry["status"]] += [(entry["test"], test["end"] - test["start"])]
|
||||
|
||||
return test_results
|
||||
|
||||
|
@ -73,24 +71,18 @@ print("%d tests timed out." % len(test_results["TIMEOUT"]))
|
|||
longest_crash = sorted(test_results["CRASH"], key=lambda x: x[1], reverse=True)
|
||||
print("Longest CRASH test took %dms (%s)" % (longest_crash[0][1], longest_crash[0][0]))
|
||||
|
||||
longest_ok = sorted(
|
||||
test_results["PASS"] + test_results["OK"],
|
||||
key=lambda x: x[1], reverse=True
|
||||
)
|
||||
csv_data = [['Test path', 'Milliseconds']]
|
||||
with open('longest_ok.csv', 'w') as csv_file:
|
||||
longest_ok = sorted(test_results["PASS"] + test_results["OK"], key=lambda x: x[1], reverse=True)
|
||||
csv_data = [["Test path", "Milliseconds"]]
|
||||
with open("longest_ok.csv", "w") as csv_file:
|
||||
writer = csv.writer(csv_file)
|
||||
writer.writerows(csv_data + longest_ok)
|
||||
|
||||
longest_fail = sorted(
|
||||
test_results["ERROR"] + test_results["FAIL"],
|
||||
key=lambda x: x[1], reverse=True
|
||||
)
|
||||
with open('longest_err.csv', 'w') as csv_file:
|
||||
longest_fail = sorted(test_results["ERROR"] + test_results["FAIL"], key=lambda x: x[1], reverse=True)
|
||||
with open("longest_err.csv", "w") as csv_file:
|
||||
writer = csv.writer(csv_file)
|
||||
writer.writerows(csv_data + longest_fail)
|
||||
|
||||
longest_timeout = sorted(test_results["TIMEOUT"], key=lambda x: x[1], reverse=True)
|
||||
with open('timeouts.csv', 'w') as csv_file:
|
||||
with open("timeouts.csv", "w") as csv_file:
|
||||
writer = csv.writer(csv_file)
|
||||
writer.writerows(csv_data + longest_timeout)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue