'This should be called after the server job is finished
to carry out any remaining cleanup (e.g. flushing any
remaining test results to the results db)'

def cleanup_parser(self):

    if (not self._using_parser):
        return
    final_tests = self.parser.end()
    for test in final_tests:
        self.__insert_test(test)
    self._using_parser = False
