summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")"