summaryrefslogtreecommitdiff
path: root/jenkins.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2016-10-15 13:52:31 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2016-10-25 15:13:03 +0000
commit6764766e86eebb2502ce1f33dc8f87a30a2d1118 (patch)
tree8523bf7eef45c3724b842f091dfc2dfc2e4ea2cb /jenkins.sh
parent669783b5d394dcfddabc0dcc2e42616aad2e6123 (diff)
jenkins.sh: Pass --testcontainer option to abe.sh
... when --testcontainerfile option is given to jenkins.sh. It can take up to 20 minutes to start a testing container when the testing board is under heavy load, so it is best to parallelize it with the build of the toolchain. If starting a container exceeds time required to build the toolchain -- then we need to investigate and fix the bottlenecks on the tester side. Change-Id: Iba061228a9aec90e8d7f9e71162526685a48d8b4
Diffstat (limited to 'jenkins.sh')
-rwxr-xr-xjenkins.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/jenkins.sh b/jenkins.sh
index 7082e279..ed3c2691 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -67,6 +67,12 @@ logname=""
# Compiler languages to build
languages=default
+# Target to build for
+target=""
+
+# File with value for --testcontainer= option
+testcontainer_file=""
+
# Whether attempt bootstrap
try_bootstrap=false
@@ -91,7 +97,7 @@ rebuild=true
orig_parameters="$@"
-OPTS="`getopt -o s:g:c:w:o:l:rt:b:h -l override:,gcc-branch:,snapshots:,gitrepo:,abe:,workspace:,options:,logserver:,logname:,languages:,runtests,target:,bootstrap,help,excludecheck:,norebuild,extraconfig: -- "$@"`"
+OPTS="`getopt -o s:g:c:w:o:l:rt:b:h -l override:,gcc-branch:,snapshots:,gitrepo:,abe:,workspace:,options:,logserver:,logname:,languages:,runtests,target:,testcontainerfile:,bootstrap,help,excludecheck:,norebuild,extraconfig: -- "$@"`"
while test $# -gt 0; do
case $1 in
--gcc-branch) change="$change gcc=$2"; shift ;;
@@ -101,6 +107,7 @@ while test $# -gt 0; do
-g|--gitrepo) git_reference=$2; shift ;;
-c|--abe) abe_dir=$2; shift ;;
-t|--target) target=$2; shift ;;
+ --testcontainerfile) testcontainer_file=$2; shift ;;
-w|--workspace) user_workspace=$2; shift ;;
-o|--options) user_options=$2; shift ;;
--logserver) logserver=$2; shift ;;
@@ -364,6 +371,15 @@ if test x"${runtests}" = xtrue; then
check="--check all"
check="${check}${excludecheck_opt}"
+ if [ x"$testcontainer_file" != x"" ]; then
+ if [ ! -f "$testcontainer_file" ]; then
+ echo "ERROR: Cannot start test container"
+ exit 1
+ fi
+
+ check="$check --testcontainer $(cat "$testcontainer_file")"
+ fi
+
ret=0
$CONFIG_SHELL ${abe_dir}/abe.sh --disable update ${check} ${tars} ${releasestr} ${platform} ${change} ${try_bootstrap} --timeout 100 --build all --disable make_docs > check.out 2> >(tee check.err >&2) || ret=$?