This is an automated email from the git hooks/post-receive script.
bernie.ogden pushed a commit to branch bernie/benchmarking in repository toolchain/abe.
commit 939e06c84e5e5a2d6105a33202af97d801f0f16e Author: Bernard Ogden bernie.ogden@linaro.org Date: Fri Jul 31 12:21:40 2015 +0200
Refactor toolchain download/install code
Pull out into function, add capability to use scp, stop changing dir as part of the toolchain install process.
Change-Id: I8f1831bbe1d2336aca006d234cc0a52c2860efbc --- scripts/Benchmark.job | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/scripts/Benchmark.job b/scripts/Benchmark.job index dcfa03e..17158e2 100755 --- a/scripts/Benchmark.job +++ b/scripts/Benchmark.job @@ -17,27 +17,38 @@ if test x"${benchmark:-}" = x; then exit 1 fi
+function get_thing { + local thing="$1" + if echo x"${thing}" | grep -q '^xhttp'; then + wget -q "${thing}" + basename "${thing}" + else + (. host.conf; . "${abe_path}"/lib/remote.sh; remote_download "${prebuilt%%:*}" [...] + echo "${prebuilt#*:}" + fi +} + #Set up maindir echo "Building benchmark ${benchmark} in ${maindir}" chmod 700 "${maindir}" cd "${maindir}"
+#Configure +echo "${ABE_DIR}"/configure --with-fileserver=148.251.136.42 --with-remote-snapsho [...] + "${ABE_DIR}"/configure --with-fileserver=148.251.136.42 --with-remote-snapsho [...] + #Install toolchain mkdir bin -cd bin -if echo x"${toolchain}" | grep -q '^xhttp'; then - wget -q "${toolchain}" - tar xf "`basename ${toolchain}`" - #TODO: abe way to handle this? - if test x"${toolchain##.tgz}" = x.tgz; then - benchgccpath="`echo $PWD/`basename ${toolchain%%.tgz}`/bin/*gcc`" - else - benchgccpath="`echo $PWD/`basename ${toolchain%%.tar.*}`/bin/*gcc`" - fi -else +if test x"${toolchain:0:1}" = x/; then echo "Toolchain assumed to be path on builder" benchgccpath="${toolchain}" +else + tarball="`get_thing ${toolchain}`" + tar -C bin "../${tarball}" + benchgccpath="`pwd`"/bin/*/bin/*gcc + rm "${tarball}" fi + if test "`echo ${benchgccpath} | wc -w`" -ne 1; then echo "Should be exactly one GCC path" 1>&2 echo "Got: ${benchgccpath}" 1>&2 @@ -50,14 +61,6 @@ if test x"${benchgccpath}" != x; then fi fi
-#Run benchmark -echo cd "${maindir}" - cd "${maindir}" - -#Configure -echo "${ABE_DIR}"/configure --with-fileserver=148.251.136.42 --with-remote-snapsho [...] - "${ABE_DIR}"/configure --with-fileserver=148.251.136.42 --with-remote-snapsho [...] - #Build echo "${ABE_DIR}"/scripts/benchmark.sh -s buildonly ${compiler_flags:+-f "${compi [...] "${ABE_DIR}"/scripts/benchmark.sh -s buildonly ${compiler_flags:+-f "${compi [...]