- job: name: tcwg-compare-results project-type: freestyle defaults: global properties: - authorization: anonymous: - job-read - job-extended-read linaro: - job-build - job-cancel - job-workspace - build-discarder: days-to-keep: 30 num-to-keep: 300 parameters: - string: name: ref_logs default: buildfarm/gcc-linaro-5-branch description: 'Reference log directory on $log_server' - string: name: new_logs default: buildfarm/gcc-linaro-5-branch description: 'Log directory on $log_server' - string: name: pass_thresh default: '0.95' description: 'Pass threshold, below which the comparison returns an error' - string: name: log_server default: dev-01.tcwglab:/home/tcwg-buildslave/logs description: 'Log_Server' - bool: name: show_results default: true description: 'Show results in the console' - string: name: cmp_version default: refs/heads/master description: 'Comparison scripts version to use' disabled: false node: tcwg-x86_64-dev-01-short retry-count: 3 display-name: 'TCWG AAA Compare results' scm: - git: url: https://git-us.linaro.org/toolchain/gcc-compare-results.git refspec: +refs/changes/*:refs/remotes/changes/* branches: - ${cmp_version} skip-tag: true shallow-clone: true wipe-workspace: true wrappers: - timeout: timeout: 60 - timestamps - ssh-agent-credentials: # tcwg-buildslave user id users: - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a' - build-name: name: '#${BUILD_NUMBER}-${ENV,var="ref_logs"}-${ENV,var="new_logs"}' builders: - shell: | #!/bin/bash set -e set -x basedir="${log_server#*:}" log_server="${log_server%:*}" status=0 dest="/tmp/CompareResults.$BASHPID" trap "ssh ${log_server} rm -rf ${dest}" EXIT HUP INT QUIT TRAP KILL PIPE TERM LOGSDIR=${WORKSPACE}/artifacts/logs mkdir -p ${LOGSDIR} ssh ${log_server} mkdir -p ${dest} scp ./compare_jobs.sh \ ./compare_tests \ ./compare_dg_tests.pl \ ./unstable-tests.txt ${log_server}:${dest} || status=1 ssh ${log_server} bash ${dest}/compare_jobs.sh \ -pass-thresh ${pass_thresh} \ $basedir/$ref_logs $basedir/$new_logs || status=1 # Copy the generated reports scp ${log_server}:${dest}/diff-\*.txt ${LOGSDIR} || true scp ${log_server}:${dest}/\*.html report.css ${LOGSDIR} || true # Print results in console if $show_results; then cat ${LOGSDIR}/*.txt fi exit $status publishers: - archive: artifacts: 'artifacts/logs/*.html,artifacts/logs/*.css,artifacts/logs/*.txt' latest-only: false