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 81f58122b2ed5ce191c03b74308ee1e69d7834e1 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 | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/scripts/Benchmark.job b/scripts/Benchmark.job index dcfa03e..35332a6 100755 --- a/scripts/Benchmark.job +++ b/scripts/Benchmark.job @@ -17,27 +17,39 @@ 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 && topdir="${abe_path}" && . "${topdir}"/lib/common.sh && remote_ [...] + basename "${prebuilt#*:}" + fi +} + #Set up maindir echo "Building benchmark ${benchmark} in ${maindir}" chmod 700 "${maindir}" cd "${maindir}"
+#Configure +#Must have run configure before first call to get_thing +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 xf "${tarball}" -C bin + benchgccpath="`ls ${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 +62,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 [...]