def parseJobName(name):
    """
    Parses job name of parametric tests
    """

    s = name.split("_")

    output = dict()

    # Find the index of the first integer (value of parameter)
    idxFirstInt = 0
    while True:
        try:
            int(s[idxFirstInt])
            break
        except ValueError:
            idxFirstInt += 1

    # Everything before the first integer is the basename
    output["baseName"] = "_".join(s[0:idxFirstInt - 1])

    # Assume everything after the basename is parameters and values
    for n in range(idxFirstInt - 1, len(s), 2):
        output[s[n]] = s[n + 1]

    return output