summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-05-26 09:43:53 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-05-31 17:58:46 +0000
commit704e206f753e72ae7325f1b535b0fd9d2a34da69 (patch)
treedb1fde256028936c1b47324141b556a1f75ca120
parentbc983668892a39a02e0c13c98a70ff6bfdca7674 (diff)
tcwg-benchmark.sh: Build on least-busy x86_64 builder by default
instead of dev-01.tcwglab. Change-Id: I59c00cbcf1637bab118e864469bf2d0147a5512b
-rwxr-xr-xtcwg-benchmark.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/tcwg-benchmark.sh b/tcwg-benchmark.sh
index 86a3a223..677b3e4c 100755
--- a/tcwg-benchmark.sh
+++ b/tcwg-benchmark.sh
@@ -16,6 +16,7 @@ run_profile="$run_profile"
sysroot="$sysroot"
fileserver="$fileserver"
forceinstall="$forceinstall"
+builder="$builder"
BUILD_NUMBER="$BUILD_NUMBER"
NODE_NAME="$NODE_NAME"
WORKSPACE="$WORKSPACE"
@@ -24,7 +25,13 @@ WORKSPACE="$WORKSPACE"
# so enable "set -u" only after above binding of variables.
set -u
-./start-container-docker.sh --arch amd64 --node "$NODE_NAME" --distro trusty --task build --prefix build_ > build-container.sh
+if echo "$builder" | grep -q ".*-[0-9]\+"; then
+ docker_host_opt="--arch amd64 --node $builder"
+else
+ docker_host_opt="--label $builder"
+fi
+
+./start-container-docker.sh $docker_host_opt --distro trusty --task build --prefix build_ > build-container.sh
build_container_host=
build_container_port=
. ./build-container.sh
@@ -51,6 +58,8 @@ case "$toolchain_url" in
toolchaindir=$(echo "${tarball}" | sed 's/.tar.xz//')
ccpath=$(find "$WORKSPACE/$toolchaindir" -name "*-gcc")
ccprefix=$(echo "$ccpath" | sed -e 's/-gcc$/-/')
+ # Copy toolchain to the build container.
+ rsync -a --delete -e "ssh -p$build_container_port" "$WORKSPACE/$toolchaindir/" "$build_container_host:$WORKSPACE/$toolchaindir/"
ccprefix="$build_container_host:$build_container_port:$ccprefix"
if [ x"$sysroot" = x"tarball" ]; then
sysroot="$build_container_host:$(find "$WORKSPACE/$toolchaindir" -name "libc")"