summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-05-22 08:00:13 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-05-22 08:00:13 +0000
commitf16e66cfd321415b6e32ec0e1ec086b9ea803e6f (patch)
treef76232d3603399a7c1c623f0c09cdaa66b3ec9cf
parent17d1596ea8b4d874001e0e2bcb1b8c712a9778c1 (diff)
tcwg-benchmark: Move code around to prepare for new features.
Change-Id: I3dd667c111de79c462890896101f56ca01f685ae
-rwxr-xr-xtcwg-benchmark.sh36
1 files changed, 22 insertions, 14 deletions
diff --git a/tcwg-benchmark.sh b/tcwg-benchmark.sh
index a0f9e20b..08473b96 100755
--- a/tcwg-benchmark.sh
+++ b/tcwg-benchmark.sh
@@ -31,19 +31,6 @@ while [ $# -ge 1 ]; do
shift 2
done
-wget --progress=dot:giga --no-check-certificate "${toolchain_url}"
-tarball=$(basename "${toolchain_url}")
-tar xf "${tarball}"
-toolchaindir=$(echo "${tarball}" | sed 's/.tar.xz//')
-ccpath=$(find "$WORKSPACE/$toolchaindir" -name "*-gcc")
-ccprefix=$(echo "$ccpath" | sed -e 's/-gcc$/-/')
-
-# Slaves for this job are virtual slaves on dev-01,
-# convert the slave name into the target board name
-boardname=$(echo "${NODE_NAME}" | sed 's/-bmk//').tcwglab
-
-rsync -az --delete bmk-scripts/ "$boardname:bmk-scripts/"
-
./start-container-docker.sh --arch amd64 --node "$NODE_NAME" --distro trusty --task build --prefix build_ > build-container.sh
build_container_host=
build_container_port=
@@ -53,6 +40,27 @@ build_container_port=
# wrong when preparing the test environment
trap "cleanup_all_containers" EXIT
+case "$toolchain_url" in
+ "ssh://"*)
+ :
+ ;;
+ "http://"*|"https://"*)
+ wget --progress=dot:giga --no-check-certificate "${toolchain_url}"
+ tarball=$(basename "${toolchain_url}")
+ tar xf "${tarball}"
+ toolchaindir=$(echo "${tarball}" | sed 's/.tar.xz//')
+ ccpath=$(find "$WORKSPACE/$toolchaindir" -name "*-gcc")
+ ccprefix=$(echo "$ccpath" | sed -e 's/-gcc$/-/')
+ ccprefix="$build_container_host:$build_container_port:$ccprefix"
+ ;;
+esac
+
+# Slaves for this job are virtual slaves on dev-01,
+# convert the slave name into the target board name
+boardname=$(echo "${NODE_NAME}" | sed 's/-bmk//').tcwglab
+
+rsync -az --delete bmk-scripts/ "$boardname:bmk-scripts/"
+
case "$testmode" in
build|verify) input_size="test" ;;
benchmark) input_size="ref" ;;
@@ -62,7 +70,7 @@ build_container_exec ssh -t "$boardname" bmk-scripts/run.sh \
--bench "$(printf '%q' "$bench_list")" \
--config "${config}" \
--cflags "$(printf '%q' "$cflags")" \
- --ccprefix "$build_container_host:$build_container_port:$ccprefix" \
+ --ccprefix "$ccprefix" \
--extension "$extension" \
--input_size "$input_size" \
--iterations "$iterations" \