blob: e0dba568233c1e58dcbbb8fb029ecc0ae6980f76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
- job:
name: tcwg-compare-results
project-type: freestyle
defaults: global
logrotate:
daysToKeep: 30
numToKeep: 300
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
linaro:
- job-build
- job-cancel
- job-workspace
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: log_server
default: dev-01.tcwglab:/home/tcwg-buildslave/logs
description: 'Log_Server'
- 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}" 0 1 2 3 5 9 13 15
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 \
$basedir/$ref_logs $basedir/$new_logs || status=1
# Copy the generated reports
scp ${log_server}:${dest}/diff-\*.txt ${LOGSDIR} || true
scp ${log_server}:${dest}/\*.xml ${LOGSDIR} || true
scp ${log_server}:${dest}/\*.html report.css ${LOGSDIR} || true
[ -f ${LOGSDIR}/report0.xml ] && sed -i ${LOGSDIR}/report0.xml -e "s|BUILD_URL|${BUILD_URL}|"
# Print results in console, in case Jenkins doesn't have the XML
# report plugin.
cat ${LOGSDIR}/*.txt
exit $status
publishers:
- archive:
artifacts: 'artifacts/logs/*.xml,artifacts/logs/*.html,artifacts/logs/*.css,artifacts/logs/*.txt'
latest-only: false
|