Build the getters support matrix.

def build_getters_support_matrix(app):
    """Build the getters support matrix."""
    status = subprocess.call("./test.sh", stdout=sys.stdout, stderr=sys.stderr)

    if status != 0:
        print("Something bad happened when processing the test reports.")
        sys.exit(-1)

    drivers = set()
    matrix = {
        m: defaultdict(dict)
        for m in dir(NetworkDriver)
        if not (m.startswith("_") or m in EXCLUDE_METHODS)
    }

    regex_name = re.compile(r"(?P<driver>\w+)\/.*::test_(?P<getter>\w+)")

    filename = "./support/tests/report.json"
    with open(filename, "r") as f:
        data = json.loads(f.read())
        for test in data["report"]["tests"]:
            match = regex_name.search(test["name"])
            if match:
                driver = match.group("driver")
                drivers.add(driver)
                method = match.group("getter")
            else:
                continue
            if method in EXCLUDE_IN_REPORT:
                continue
            result = test["outcome"]

            if method in METHOD_ALIASES.keys():
                method = METHOD_ALIASES[method]

            intermediate_result = matrix[method].get(driver, None)
            matrix[method][driver] = _merge_results(result, intermediate_result)

    sorted_methods = sorted(matrix.keys())
    drivers = sorted(drivers)
    env = Environment(loader=FileSystemLoader("."))
    template_file = env.get_template("matrix.j2")
    rendered_template = template_file.render(
        matrix=matrix, drivers=drivers, sorted_methods=sorted_methods
    )

    with open("support/matrix.rst", "w") as f:
        f.write(rendered_template)