summaryrefslogtreecommitdiff
path: root/tcwg-benchmark.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-07-28 18:17:01 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-07-28 18:18:11 +0000
commita6cf674df0e97fa9eca9608299c360e6d9dd11b4 (patch)
treed2bb08dd541f6e31e83c578fa93e7786d07e6106 /tcwg-benchmark.sh
parent1f8fbbae5ef71561893900780e4767e6081e155a (diff)
tcwg-benchmark{-bare}.sh: Remove unnecessary level
Change-Id: If48393a64061502ffc1651e39ef5ef55801c19d2
Diffstat (limited to 'tcwg-benchmark.sh')
-rwxr-xr-xtcwg-benchmark.sh85
1 files changed, 40 insertions, 45 deletions
diff --git a/tcwg-benchmark.sh b/tcwg-benchmark.sh
index 9c92011f..ca611bc7 100755
--- a/tcwg-benchmark.sh
+++ b/tcwg-benchmark.sh
@@ -149,56 +149,51 @@ case "$toolchain_type" in
;;
esac
+# In the ssh:// case, we have to perform the 'find' operations
+# remotely.
case "$toolchain_url" in
- "http://"*|"https://"*|"rsync://"*|"ssh://"*)
-
- # In the ssh:// case, we have to perform the 'find' operations
- # remotely.
- case "$toolchain_url" in
- "ssh://"*)
- maybe_remote="ssh -p $build_container_port $build_container_host"
- ;;
- *)
- maybe_remote=""
- ;;
- esac
-
- case "$toolchain_type" in
- "gnu"|"llvm") ;;
- "auto")
- if [ x"$($maybe_remote find "$toolchaindir" -path "*bin/*gcc" | wc -l)" != x"0" ]; then
- toolchain_type="gnu"
- elif [ x"$($maybe_remote find "$toolchaindir" -path "*bin/*clang" | wc -l)" != x"0" ]; then
- toolchain_type="llvm"
- else
- echo "ERROR: Cannot autodetect toolchain type"
- exit 1
- fi
- ;;
- esac
+ "ssh://"*)
+ maybe_remote="ssh -p $build_container_port $build_container_host"
+ ;;
+ *)
+ maybe_remote=""
+ ;;
+esac
- case "$toolchain_type" in
- "gnu") ccname="gcc" ;;
- "llvm") ccname="clang" ;;
- esac
- ccpath=$($maybe_remote find "$toolchaindir" -path "*bin/*$ccname")
- if [ "$(echo "$ccpath" | wc -w)" -ne 1 ]; then
- echo "ERROR: found more than one compiler: $ccpath"
+case "$toolchain_type" in
+ "gnu"|"llvm") ;;
+ "auto")
+ if [ x"$($maybe_remote find "$toolchaindir" -path "*bin/*gcc" | wc -l)" != x"0" ]; then
+ toolchain_type="gnu"
+ elif [ x"$($maybe_remote find "$toolchaindir" -path "*bin/*clang" | wc -l)" != x"0" ]; then
+ toolchain_type="llvm"
+ else
+ echo "ERROR: Cannot autodetect toolchain type"
exit 1
fi
+ ;;
+esac
- # Non-ssh:// cases have to copy the just-copied toolchain to
- # the remote build container. For ssh://, we'll access the
- # toolchain remotely.
- case "$toolchain_url" in
- "ssh://"*) ;;
- *)
- ccprefix=$(echo "$ccpath" | sed -e "s/$ccname\$//")
- # Copy toolchain to the build container.
- rsync -a --delete -e "ssh -p$build_container_port" "$toolchaindir/" "$build_container_host:$toolchaindir/"
- ccprefix="$build_container_host:$build_container_port:$ccprefix"
- ;;
- esac
+case "$toolchain_type" in
+ "gnu") ccname="gcc" ;;
+ "llvm") ccname="clang" ;;
+esac
+ccpath=$($maybe_remote find "$toolchaindir" -path "*bin/*$ccname")
+if [ "$(echo "$ccpath" | wc -w)" -ne 1 ]; then
+ echo "ERROR: found more than one compiler: $ccpath"
+ exit 1
+fi
+
+# Non-ssh:// cases have to copy the just-copied toolchain to
+# the remote build container. For ssh://, we'll access the
+# toolchain remotely.
+case "$toolchain_url" in
+ "ssh://"*) ;;
+ *)
+ ccprefix=$(echo "$ccpath" | sed -e "s/$ccname\$//")
+ # Copy toolchain to the build container.
+ rsync -a --delete -e "ssh -p$build_container_port" "$toolchaindir/" "$build_container_host:$toolchaindir/"
+ ccprefix="$build_container_host:$build_container_port:$ccprefix"
;;
esac