E2E summarizer: Put test-reading logic in function

Previously, the only purpose of the coverage summarizer was to collect
information about existing Autotest tests. Therefore, it made sense to
keep the logic about reading tests in main().

However, as we look forward to expanding this script to also account for
unwritten tests, this is no longer the only purpose of main().
This CL improves readability by putting the test-reading logic in a
separate function.

TEST=go run fw_e2e_coverage_summarizer.go

Change-Id: Ib0d94aaf9aaae90d608baadfd6bf72c85afd5aa2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crostestutils/+/2027903
Tested-by: Greg Edelston <gredelston@google.com>
Reviewed-by: Kevin Shelton <kmshelton@chromium.org>
Commit-Queue: Greg Edelston <gredelston@google.com>
1 file changed