def METHOD_NAME(database, job, recipe, content, possible):
    """
    Extract results from run_tests and update the database.
    """
    for match in TEST_RE.finditer(content):
        caveats = match.group('caveats')
        reason = match.group('reason')
        if caveats is not None:
            caveats = caveats.split(',')
        time = match.group('time')
        if time is not None:
            time = float(time)
        tname = match.group('test').split(':')[-1]
        status = match.group('status')
        if (possible is None) or (status in possible):
            url = job.url if job.url is not None else job.filename
            database[tname][job.number].append(Test(recipe, status, caveats, reason, time, url))