Skip to content

Instantly share code, notes, and snippets.

@arssher
Created March 7, 2023 12:47
Show Gist options
  • Select an option

  • Save arssher/189023b0fa53d0303f870d1a011d76f3 to your computer and use it in GitHub Desktop.

Select an option

Save arssher/189023b0fa53d0303f870d1a011d76f3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import sys
logf = sys.argv[1]
with open(logf) as file:
lines = file.readlines()
# print(lines)
started = [l.split(" ")[0] for l in lines if l.startswith("test_runner")]
skipped = [l.split("SKIPPED ")[1].split(" ")[0] for l in lines if "SKIPPED" in l]
passed = [l.split("PASSED ")[1].split(" ")[0] for l in lines if "PASSED" in l]
hanged = [t for t in started if t not in passed and t not in skipped]
print(hanged)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment