From 3777e6d90ef591877fe178fa2b4e63cbce37f3a6 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Thu, 29 Jul 2021 10:14:04 +0000 Subject: tcwg-benchmark.sh: Fix handling of ccprefix for rsync:// protocol Change-Id: I11cd5da279d8257fa897148dd3d60c749ea79a40 --- tcwg-benchmark.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'tcwg-benchmark.sh') diff --git a/tcwg-benchmark.sh b/tcwg-benchmark.sh index 1d8db998..1c0d5c69 100755 --- a/tcwg-benchmark.sh +++ b/tcwg-benchmark.sh @@ -196,26 +196,29 @@ case "$toolchain_type" in ;; 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://"*) ;; *) + 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 + 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" + if [ x"$builder" != x"bmk_board" ]; then + ccprefix="$build_container_host:$build_container_port:$ccprefix" + fi ;; esac -- cgit v1.2.3