10 test -r "$config" || die "usage: fate.sh <config>"
12 workdir=$(cd $(dirname $config) && pwd)
18 test -n "$slot" || die "slot not specified"
19 test -n "$repo" || die "repo not specified"
20 test -d "$samples" || die "samples location not specified"
24 (set -C; exec >$lock) 2>/dev/null || return
30 file:*|/*) src="${repo#file:}" ;;
31 git:*) git clone "$repo" "$src" ;;
38 git:*) git pull --quiet ;;
44 ${shell} ${src}/configure \
46 --samples="${samples}" \
48 --enable-memory-poisoning \
49 ${arch:+--arch=$arch} \
50 ${cpu:+--cpu="$cpu"} \
51 ${cross_prefix:+--cross-prefix="$cross_prefix"} \
55 ${target_os:+--target-os="$target_os"} \
56 ${sysroot:+--sysroot="$sysroot"} \
57 ${target_exec:+--target-exec="$target_exec"} \
58 ${target_path:+--target-path="$target_path"} \
59 ${target_samples:+--target-samples="$target_samples"} \
60 ${extra_cflags:+--extra-cflags="$extra_cflags"} \
61 ${extra_ldflags:+--extra-ldflags="$extra_ldflags"} \
62 ${extra_libs:+--extra-libs="$extra_libs"} \
68 ${make} ${makeopts} && ${make} install
72 test "$build_only" = "yes" && return
74 ${make} ${makeopts} -k fate
78 rm -rf ${build} ${inst}
82 date=$(date -u +%Y%m%d%H%M%S)
83 echo "fate:0:${date}:${slot}:${version}:$1:$2:${comment}" >report
84 cat ${build}/config.fate ${build}/tests/data/fate/*.rep >>report
85 test -n "$fate_recv" && $tar report *.log | gzip | $fate_recv
94 mkdir -p ${workdir} || die "Error creating ${workdir}"
95 lock ${workdir} || die "${workdir} locked"
96 cd ${workdir} || die "cd ${workdir} failed"
99 : ${build:=${workdir}/build}
100 : ${inst:=${workdir}/install}
102 test -d "$src" && update || checkout || die "Error fetching source"
106 version=$(${src}/version.sh ${src})
107 test "$version" = "$(cat version-$slot 2>/dev/null)" && exit 0
108 echo ${version} >version-$slot
110 rm -rf "${build}" *.log
113 configure >configure.log 2>&1 || fail $? "error configuring"
114 compile >compile.log 2>&1 || fail $? "error compiling"
115 fate >test.log 2>&1 || fail $? "error testing"