test-patch has the ability to support multiple test formats. Test formats have some extra hooks to process the output of test tools and write the results to some tables. Every test format plug-in must have one line in order to be recognized:
add_test_format <pluginname>
Test format plugins can provide following two methods, which will be called by test-patch if defined.
pluginname_process_tests
pluginname_finalize_results
For an example of how to write a test-format plugin, you can look at junit plugin bundled in Apache Yetus.