10 test -r "$config" || die "usage: fate.sh <config>"
12 workdir=$(dirname $config)
17 test -n "$slot" || die "slot not specified"
18 test -n "$repo" || die "repo not specified"
19 test -d "$samples" || die "samples location not specified"
23 (set -C; exec >$lock) 2>/dev/null || return
29 file:*|/*) src="${repo#file:}" ;;
30 git:*) git clone "$repo" "$src" ;;
31 svn:*) svn co "$repo" "$src" ;;
47 --samples="${samples}" \
48 ${arch:+--arch=$arch} \
49 ${cpu:+--cpu="$cpu"} \
50 ${cross_prefix:+--cross-prefix="$cross_prefix"} \
52 ${target_os:+--target-os="$target_os"} \
53 ${sysroot:+--sysroot="$sysroot"} \
54 ${target_exec:+--target-exec="$target_exec"} \
55 ${target_path:+--target-path="$target_path"} \
56 ${extra_cflags:+--extra-cflags="$extra_cflags"} \
57 ${extra_ldflags:+--extra-ldflags="$extra_ldflags"} \
58 ${extra_libs:+--extra-libs="$extra_libs"} \
64 ${make} ${makeopts} && ${make} install
69 ${make} ${makeopts} -k fate
73 rm -r ${build} ${inst}
77 date=$(date -u +%Y%m%d%H%M%S)
78 echo "fate:0:${date}:${slot}:${version}:$1:$2" >report
79 cat ${build}/config.fate ${build}/tests/data/fate/*.rep >>report
80 test -n "$fate_recv" && tar cz report *.log | $fate_recv
89 mkdir -p ${workdir} || die "Error creating ${workdir}"
90 lock ${workdir} || die "${workdir} locked"
91 cd ${workdir} || die "cd ${workdir} failed"
94 build=${workdir}/build
95 inst=${workdir}/install
96 report=tests/data/fate/report
98 test -d "$src" && update || checkout || die "Error fetching source"
102 version=$(${src}/version.sh ${src})
103 test "$version" = "$(cat version 2>/dev/null)" && exit 0
104 echo ${version} >version
109 configure >configure.log 2>&1 || fail $? "error configuring"
110 compile >compile.log 2>&1 || fail $? "error compiling"
111 fate >test.log 2>&1 || fail $? "error testing"