Mercurial > hg > aboriginal
changeset 841:4952504f5c57
Add a "sources/more" directory, move buildall and smoketest-all into it. (Stuff that build.sh doesn't wrap.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 10 Oct 2009 02:22:29 -0500 |
parents | 96b276eda7f1 |
children | dee27a32b160 |
files | buildall.sh smoketest-all.sh sources/more/buildall.sh sources/more/smoketest-all.sh |
diffstat | 4 files changed, 92 insertions(+), 92 deletions(-) [+] |
line wrap: on
line diff
--- a/buildall.sh Fri Oct 09 22:42:35 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -#!/bin/bash - -# Build every target architecture, creating out-$ARCH.txt log files. -# If $FORK is set, build them in parallel. - -. sources/functions.sh || exit 1 - -[ -z "$STATIC_CROSS_COMPILER_HOST" ] && export STATIC_CROSS_COMPILER_HOST=i686 -export BUILD_STATIC_NATIVE_COMPILER=1 -export FAIL_QUIET=1 - -[ -z "${ARCHES}" ] && - ARCHES="$(cd sources/targets/; ls | grep -v '^hw-')" - -[ -z "$HWARCHES" ] && - HWARCHES="$(cd sources/targets; ls | grep '^hw-')" - -[ ! -z "$FORK" ] && QUIET=1 - -trap "killtree $$" EXIT - -# Build the host architecture. This has to be built first so the other -# architectures can canadian cross static compilers to run on the host using -# this toolchain to link against a host version of uClibc. - -# This also performs the download.sh and host-tools.sh steps, which don't -# parallelize well if many build.sh instances try to call them at once. - -# If this fails, don't bother trying to build the other targets. - -blank_tempdir build -mkdir -p build/logs && -ln -s out-"$STATIC_CROSS_COMPILER_HOST".txt build/logs/out-host.txt && -(./build.sh 2>&1 "$STATIC_CROSS_COMPILER_HOST" || dienow) \ - | tee build/logs/build-"$STATIC_CROSS_COMPILER_HOST".txt | maybe_quiet - -# Build all the remaining cross compilers, possibly in parallel - -for i in ${ARCHES} ${HWARCHES} -do - [ "$i" != "$STATIC_CROSS_COMPILER_HOST" ] && - maybe_fork "./build.sh $i 2>&1 | tee build/logs/build-${i}.txt | maybe_quiet" -done - -wait - -# Run smoketest.sh for each non-hw target. - -for i in ${ARCHES} -do - maybe_fork "./smoketest.sh $i 2>&1 | tee build/logs/smoketest-$i.txt | maybe_quiet" -done - -wait - -./smoketest-all.sh --logs
--- a/smoketest-all.sh Fri Oct 09 22:42:35 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -#!/bin/bash - -. sources/functions.sh || exit 1 - -if [ "$1" == "--logs" ] -then - for i in build/logs/smoketest-*.txt - do - NAME="$(echo $i | sed 's/.*smoketest-\(.*\)\.txt/\1/')" - echo -n "Testing $NAME:" - RESULT="$(grep 'Hello world!' "$i")" - [ -z "$RESULT" ] && echo "FAIL" || echo "PASS" - done - - exit -fi - -function dotest() -{ - [ -z "$FORK" ] && echo -n "Testing $1:" - [ ! -z "$VERBOSE" ] && VERBOSITY="tee >(cat >&2) |" - RESULT="$(./smoketest.sh "$1" 2>&1 | eval "$VERBOSITY grep 'Hello world!'")" - [ -z "$RESULT" ] && RESULT="FAIL" || RESULT="PASS" - [ -z "$FORK" ] && echo "$RESULT" || echo "Testing $1:$RESULT" - rm -f build/system-image-"$1"/hdb.img 2>/dev/null -} - -# Test all non-hw targets to see whether or not they can compile and run -# the included "hello world" program. - -for i in $(ls -pd build/system-image-* | sed -n 's@.*/system-image-\(.*\)/@\1@p' | grep -v "^hw-") -do - maybe_fork "dotest $i" -done - -wait
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/more/buildall.sh Sat Oct 10 02:22:29 2009 -0500 @@ -0,0 +1,56 @@ +#!/bin/bash + +# Build every target architecture, creating out-$ARCH.txt log files. +# If $FORK is set, build them in parallel. + +. sources/functions.sh || exit 1 + +[ -z "$STATIC_CROSS_COMPILER_HOST" ] && export STATIC_CROSS_COMPILER_HOST=i686 +export BUILD_STATIC_NATIVE_COMPILER=1 +export FAIL_QUIET=1 + +[ -z "${ARCHES}" ] && + ARCHES="$(cd sources/targets/; ls | grep -v '^hw-')" + +[ -z "$HWARCHES" ] && + HWARCHES="$(cd sources/targets; ls | grep '^hw-')" + +[ ! -z "$FORK" ] && QUIET=1 + +trap "killtree $$" EXIT + +# Build the host architecture. This has to be built first so the other +# architectures can canadian cross static compilers to run on the host using +# this toolchain to link against a host version of uClibc. + +# This also performs the download.sh and host-tools.sh steps, which don't +# parallelize well if many build.sh instances try to call them at once. + +# If this fails, don't bother trying to build the other targets. + +blank_tempdir build +mkdir -p build/logs && +ln -s out-"$STATIC_CROSS_COMPILER_HOST".txt build/logs/out-host.txt && +(./build.sh 2>&1 "$STATIC_CROSS_COMPILER_HOST" || dienow) \ + | tee build/logs/build-"$STATIC_CROSS_COMPILER_HOST".txt | maybe_quiet + +# Build all the remaining cross compilers, possibly in parallel + +for i in ${ARCHES} ${HWARCHES} +do + [ "$i" != "$STATIC_CROSS_COMPILER_HOST" ] && + maybe_fork "./build.sh $i 2>&1 | tee build/logs/build-${i}.txt | maybe_quiet" +done + +wait + +# Run smoketest.sh for each non-hw target. + +for i in ${ARCHES} +do + maybe_fork "sources/more/smoketest.sh $i 2>&1 | tee build/logs/smoketest-$i.txt | maybe_quiet" +done + +wait + +./smoketest-all.sh --logs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/more/smoketest-all.sh Sat Oct 10 02:22:29 2009 -0500 @@ -0,0 +1,36 @@ +#!/bin/bash + +. sources/functions.sh || exit 1 + +if [ "$1" == "--logs" ] +then + for i in build/logs/smoketest-*.txt + do + NAME="$(echo $i | sed 's/.*smoketest-\(.*\)\.txt/\1/')" + echo -n "Testing $NAME:" + RESULT="$(grep 'Hello world!' "$i")" + [ -z "$RESULT" ] && echo "FAIL" || echo "PASS" + done + + exit +fi + +function dotest() +{ + [ -z "$FORK" ] && echo -n "Testing $1:" + [ ! -z "$VERBOSE" ] && VERBOSITY="tee >(cat >&2) |" + RESULT="$(./smoketest.sh "$1" 2>&1 | eval "$VERBOSITY grep 'Hello world!'")" + [ -z "$RESULT" ] && RESULT="FAIL" || RESULT="PASS" + [ -z "$FORK" ] && echo "$RESULT" || echo "Testing $1:$RESULT" + rm -f build/system-image-"$1"/hdb.img 2>/dev/null +} + +# Test all non-hw targets to see whether or not they can compile and run +# the included "hello world" program. + +for i in $(ls -pd build/system-image-* | sed -n 's@.*/system-image-\(.*\)/@\1@p' | grep -v "^hw-") +do + maybe_fork "dotest $i" +done + +wait