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 ;;
46 --samples="${samples}" \
48 ${arch:+--arch=$arch} \
49 ${cpu:+--cpu="$cpu"} \
50 ${cross_prefix:+--cross-prefix="$cross_prefix"} \
53 ${target_os:+--target-os="$target_os"} \
54 ${sysroot:+--sysroot="$sysroot"} \
55 ${target_exec:+--target-exec="$target_exec"} \
56 ${target_path:+--target-path="$target_path"} \
57 ${extra_cflags:+--extra-cflags="$extra_cflags"} \
58 ${extra_ldflags:+--extra-ldflags="$extra_ldflags"} \
59 ${extra_libs:+--extra-libs="$extra_libs"} \
65 ${make} ${makeopts} && ${make} install
70 ${make} ${makeopts} -k fate
74 rm -rf ${build} ${inst}
78 date=$
(date -u +%Y
%m
%d
%H
%M
%S
)
79 echo "fate:0:${date}:${slot}:${version}:$1:$2:${comment}" >report
80 cat ${build}/config.fate
${build}/tests
/data
/fate
/*.rep
>>report
81 test -n "$fate_recv" && $tar report
*.log |
gzip |
$fate_recv
90 mkdir
-p ${workdir} || die
"Error creating ${workdir}"
91 lock
${workdir} || die
"${workdir} locked"
92 cd ${workdir} || die
"cd ${workdir} failed"
95 : ${build:=${workdir}/build}
96 : ${inst:=${workdir}/install}
98 test -d "$src" && update || checkout || die
"Error fetching source"
102 version
=$
(${src}/version.sh
${src})
103 test "$version" = "$(cat version-$slot 2>/dev/null)" && exit 0
104 echo ${version} >version-
$slot
106 rm -rf "${build}" *.log
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"