def METHOD_NAME (tst):
    # The logger is freed at the end of the utest function but the tasks are
    # performed afterwards, so we recreate the logger.
    logfile = os.path.join (tst.bldnode.abspath(), "utest_run.log")
    tst.logger = Logs.make_logger (logfile, "utest_run")
    def format_out (stream, name):
        s = name + ":" + os.linesep
        for l in ibexutils.to_unicode(stream).splitlines(True):
            s += "  " + l
        return s
    def parse_output (stream):
        for l in ibexutils.to_unicode(stream).splitlines(True):
            if l.startswith ("Run"):
                data = l.split()
                return (int(data[1]), int(data[3]) + int(data[5]))
            if l.startswith ("Tests run"):
                data = l.split()
                return (int(data[2][:-1]), int(data[4]))
            elif l.startswith ("OK"):
                return (int(l.split()[1][1:]), 0)
        return (None, None)
    lst = sorted (getattr(tst, 'utest_results', []), key = lambda x:x[0])
    nfailed = 0
    ntot = 0
    errmsg = ""
    for (f, ret, stdout, stderr) in lst:
        name = os.path.basename (f)
        tst.start_msg (name)
        (n, nf) = parse_output (stdout)
        if ret:
            errmsg += os.linesep
            errmsg += "Test '%s' failed with return code %s" %(name, ret)
            errmsg += os.linesep
            errmsg += format_out (stderr, "stderr") + format_out (stdout, "stdout")
        if n is None: # An error occurs: could not parse the output
            if ret:
                tst.end_msg ("Error: program failure !", color = "RED")
                ntot += 1
                nfailed += 1
            else:
                tst.end_msg ("Could not parse the output", color = "YELLOW")
                Logs.warn (format_out(stderr, "stderr") + format_out(stdout, "stdout"))
        else:
            tst.end_msg ("%d/%d" % (n-nf,n), color=("RED" if nf else "GREEN"))
            ntot += n
            nfailed += nf
    tst.msg ("=========", "=========", color = "NORMAL")
    if nfailed:
        tst.msg ("All tests", "%d/%d" % (ntot-nfailed, ntot), color = "RED")
        h = "Error: %s test%s failed" % (nfailed, "s" if nfailed > 1 else "")
        tst.fatal (h + os.linesep + errmsg)
    else:
        tst.msg ("All tests", "%d/%d" % (ntot-nfailed, ntot), "GREEN")
        Logs.info ("All tests passed")
    Logs.free_logger (tst.logger)
    tst.logger = None