aboutsummaryrefslogtreecommitdiff
[Required python module]
1. py3o.template
2. jenkinsapi


[Pre-setup]
Create a file for authentication
touch ~/.netrc
Please change the file permissions to 600
chmod 600 ~/.netrc

    The authentication credential for LAVA/Jenkins server should be put in ~/.netrc
    e.g.
       machine   validation.linaro.org
       login     USERNAME
       password  AUTHENTICATION TOKEN

    NOTE: AUTHENTICATION TOKEN is found under https://validation.linaro.org/api/tokens/
    e.g.
       machine   validation.linaro.org
       login     firstname.lastname
       password  abcdefghijklmnopq1234567890

[How to run the script]
1. Option '-h' shows all options
    $./report_automation.py -h
    usage: report_automation.py [-h] -bn BUILD_NO [-u JENKINS_URL]
                                [-job JENKINS_JOB_NAME]
                                [-a MANUAL_LAVA_JOBS [MANUAL_LAVA_JOBS ...]]
                                [-d EXCLUDE_LAVA_JOBS [EXCLUDE_LAVA_JOBS ...]]
                                [-temp TEMPLATE_FILE] [-o OUTPUT_FILE] [-f]

    This script will collect all data and make a report.
    optional arguments:
      -h, --help            show this help message and exit
      -bn BUILD_NO, --build-no BUILD_NO
                            Specify the Jenkins build number. This is MANDATORY.
      -u JENKINS_URL, --jenkins-url JENKINS_URL
                            Specify the Jenkins URL. This is optional.
                            Default: https://android-build.linaro.org/jenkins/
      -job JENKINS_JOB_NAME, --jenkins-job-name JENKINS_JOB_NAME
                            Specify the Jenkins job name.This is optional.
                            Default: linaro-android_lcr-member-juno
      -a MANUAL_LAVA_JOBS [MANUAL_LAVA_JOBS ...], --manual-lava-jobs MANUAL_LAVA_JOBS [MANUAL_LAVA_JOBS ...]
                            Specify the test jobs that were submitted manually. This is optional.
      -d EXCLUDE_LAVA_JOBS [EXCLUDE_LAVA_JOBS ...], --exclude-lava-jobs EXCLUDE_LAVA_JOBS [EXCLUDE_LAVA_JOBS ...]
                            Specify the test jobs that don't want to be included in the report. This is optional.
      -temp TEMPLATE_FILE, --template TEMPLATE_FILE
                            Specify the report template. This is optional.
                            Default: py3o_report_juno_template.odt
      -o OUTPUT_FILE, --output OUTPUT_FILE
                            Specify the output file name. This is optional.
                            Default: report_output.odt
      -f, --force-report    Generate report even there're some errors

2. ** The authentication credential for LAVA server MUST be put in ~/.netrc as it showed in Pre-setup
3. Only '--build-no' argument is required.
    Example.
    $./report_automation.py --build-no 52 -job linaro-android_lcr-reference-juno-m