Skip to content

Instantly share code, notes, and snippets.

@lhimo
lhimo / extract-test-list.sh
Created December 16, 2022 16:23
Extract a test list from flutter drive log file
#!/bin/bash
# extract the test list from flutter drive log and creates a file with [E] marking the failed ones
file="flutter-drive.log"
# get lines containing test titles (assuming they all contain a "TESTKEY-" string and titles are unique)
grep "^I/flutter .*TESTKEY-" "$file" > test-list
# remove extra lines related to failures
grep -v "The test description was:" test-list > tmpfile && mv tmpfile test-list
# get lines with skipped tests