aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2018-05-25 14:35:43 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2018-06-07 07:00:39 +0000
commite7432f8b2740986acb38552fbc7d8c548e2314d6 (patch)
tree797b3c79af13489a7b717c1614f2cbba0a9f50e2
parent7d61605a2d8538f4ad72ef8b7c6bc25cc8063c40 (diff)
tcwg-buildfarm, tcwg-buildfarm-cmp, tcwg-compare-results: Add dryrun parameter.
If set to true, the jobs print what they would do, but do not run time/cpu consuming tasks. Change-Id: Idf114a0b017ec4e686a9003fd9ecdb74b2e3f9fa
-rw-r--r--tcwg-buildfarm-cmp.yaml6
-rw-r--r--tcwg-buildfarm.yaml4
-rw-r--r--tcwg-compare-results.yaml42
3 files changed, 36 insertions, 16 deletions
diff --git a/tcwg-buildfarm-cmp.yaml b/tcwg-buildfarm-cmp.yaml
index 32038a35db..36867bb92d 100644
--- a/tcwg-buildfarm-cmp.yaml
+++ b/tcwg-buildfarm-cmp.yaml
@@ -90,6 +90,10 @@
name: displaytag
default: 'manual'
description: 'Tag to display in the Jenkins console, so that the build name is more helpful'
+ - bool:
+ name: dryrun
+ default: false
+ description: 'Dry-run, do nothing, just print steps'
disabled: false
node: tcwg-coordinator
concurrent: true
@@ -113,6 +117,7 @@
extraconfig=$extraconfig
log_server=$log_server
target_list=$target_list
+ dryrun=$dryrun
EOF
echo "NOTE: Buildfarm job parameters:"
@@ -122,6 +127,7 @@
ref_logs=$ref_log_name
new_logs=$eval_log_name
log_server=$log_server
+ dryrun=$dryrun
EOF
echo "NOTE: Compare Results job parameters:"
diff --git a/tcwg-buildfarm.yaml b/tcwg-buildfarm.yaml
index e614f0f2b4..1744cc8d59 100644
--- a/tcwg-buildfarm.yaml
+++ b/tcwg-buildfarm.yaml
@@ -94,6 +94,10 @@
name: binaries
default: false
description: 'Create binary tarballs'
+ - bool:
+ name: dryrun
+ default: false
+ description: 'Dry-run, do nothing, just print steps'
disabled: false
node: tcwg-coordinator
child-workspace: $target
diff --git a/tcwg-compare-results.yaml b/tcwg-compare-results.yaml
index 68d63f1d21..558f4d58c3 100644
--- a/tcwg-compare-results.yaml
+++ b/tcwg-compare-results.yaml
@@ -43,6 +43,10 @@
name: cmp_version
default: refs/heads/master
description: 'Comparison scripts version to use'
+ - bool:
+ name: dryrun
+ default: false
+ description: 'Dry-run, do nothing, just print steps'
disabled: false
node: tcwg-x86_64-dev-01-short
retry-count: 3
@@ -82,26 +86,32 @@
trap "ssh ${log_server} rm -rf ${dest}" EXIT HUP INT QUIT TRAP KILL PIPE TERM
- LOGSDIR=${WORKSPACE}/artifacts/logs
+ if ! $dryrun; then
+ LOGSDIR=${WORKSPACE}/artifacts/logs
- mkdir -p ${LOGSDIR}
+ 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 ${target_list} || status=1
+ 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 ${target_list} || status=1
- # Copy the generated reports
- scp ${log_server}:${dest}/\*-diff-\*.txt ${LOGSDIR} || true
- scp ${log_server}:${dest}/\*.html report.css ${LOGSDIR} || true
+ # 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
+ # Print results in console
+ if $show_results; then
+ cat ${LOGSDIR}/*.txt
+ fi
+ else
+ echo DRYRUN: compare_jobs.sh \
+ -pass-thresh ${pass_thresh} \
+ $basedir/$ref_logs $basedir/$new_logs ${target_list}
fi
exit $status