centralize test-spec parsing and matching

This cleans up the code and fixes inconsistencies between different users of
the test-spec.
1 file changed