tasks/libs/junit_upload.py
def upload_junitxmls(output_dir, owners, additional_tags=None, job_url=""):
    """
    Upload all per-team split JUnit XMLs from given directory.
    """
    processes = []
    process_env = os.environ.copy()
    process_env["CI_JOB_URL"] = job_url
    for owner in owners:
        args = [
            "--service",
            "datadog-agent",
            "--tags",
            'test.codeowners:["' + CODEOWNERS_ORG_PREFIX + owner + '"]',
        ]
        if additional_tags:
            args.extend(additional_tags)
        args.append(os.path.join(output_dir, owner + ".xml"))
        processes.append(subprocess.Popen(DATADOG_CI_COMMAND + args, bufsize=-1, env=process_env))
    for process in processes:
        exit_code = process.wait()
        if exit_code != 0:
            raise subprocess.CalledProcessError(exit_code, DATADOG_CI_COMMAND)

    Upload all per-team split JUnit XMLs from given directory.
    
Upload all per-team split JUnit XMLs from given directory.
Upload all per - team split JUnit XMLs from given directory .
def upload_junitxmls(output_dir, owners, additional_tags=None, job_url=""):
    processes = []
    process_env = os.environ.copy()
    process_env["CI_JOB_URL"] = job_url
    for owner in owners:
        args = [
            "--service",
            "datadog-agent",
            "--tags",
            'test.codeowners:["' + CODEOWNERS_ORG_PREFIX + owner + '"]',
        ]
        if additional_tags:
            args.extend(additional_tags)
        args.append(os.path.join(output_dir, owner + ".xml"))
        processes.append(subprocess.Popen(DATADOG_CI_COMMAND + args, bufsize=-1, env=process_env))
    for process in processes:
        exit_code = process.wait()
        if exit_code != 0:
            raise subprocess.CalledProcessError(exit_code, DATADOG_CI_COMMAND)
def upload_junitxmls ( output_dir , owners , additional_tags = None , job_url = "" ) : processes = [ ] process_env = os . environ . copy ( ) process_env [ "CI_JOB_URL" ] = job_url for owner in owners : args = [ "--service" , "datadog-agent" , "--tags" , 'test.codeowners:["' + CODEOWNERS_ORG_PREFIX + owner + '"]' , ] if additional_tags : args . extend ( additional_tags ) args . append ( os . path . join ( output_dir , owner + ".xml" ) ) processes . append ( subprocess . Popen ( DATADOG_CI_COMMAND + args , bufsize = - 1 , env = process_env ) ) for process in processes : exit_code = process . wait ( ) if exit_code != 0 : raise subprocess . CalledProcessError ( exit_code , DATADOG_CI_COMMAND )
Upload all per-team split JUnit XMLs from given directory.
Upload all per - team split JUnit XMLs from given directory .
"""
    Upload all per-team split JUnit XMLs from given directory.
    """
output_dir
owners
additional_tags
job_url