diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2021-07-28 18:17:01 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2021-07-28 18:18:11 +0000 |
commit | a6cf674df0e97fa9eca9608299c360e6d9dd11b4 (patch) | |
tree | d2bb08dd541f6e31e83c578fa93e7786d07e6106 /tcwg-benchmark-bare.sh | |
parent | 1f8fbbae5ef71561893900780e4767e6081e155a (diff) |
tcwg-benchmark{-bare}.sh: Remove unnecessary level
Change-Id: If48393a64061502ffc1651e39ef5ef55801c19d2
Diffstat (limited to 'tcwg-benchmark-bare.sh')
-rwxr-xr-x | tcwg-benchmark-bare.sh | 79 |
1 files changed, 37 insertions, 42 deletions
diff --git a/tcwg-benchmark-bare.sh b/tcwg-benchmark-bare.sh index e21222d2..226b0cd0 100755 --- a/tcwg-benchmark-bare.sh +++ b/tcwg-benchmark-bare.sh @@ -135,53 +135,48 @@ 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 - # No need to copy the toolchain to the build container: it - # runs on the local machine and has access to $toolchaindir. - # FIXME: ssh:// access is currently broken. - case "$toolchain_url" in - "ssh://"*) ;; - *) - ccprefix=$(echo "$ccpath" | sed -e "s/$ccname\$//") - ;; - 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 + +# No need to copy the toolchain to the build container: it +# runs on the local machine and has access to $toolchaindir. +# FIXME: ssh:// access is currently broken. +case "$toolchain_url" in + "ssh://"*) ;; + *) + ccprefix=$(echo "$ccpath" | sed -e "s/$ccname\$//") ;; esac |