Browse code

fate: support testing of release branches

Adding 'branch=release/10' to the fate config file will check the
release/10 branch instead of master. If no branch is specified it will
use 'master' so that existing config are still valid.

The server side changes are already deployed, see
https://fate.libav.org/v10/ for an example. The server supports only the
release/* branches.

The server enforces that a single slot tests always the same branch.
Please append "-v$RELEASE" to the slot of release branch configs or make
the slot otherwise unique.

A different fate samples dir is needed for each release branch. make
fate-rsync has the correct URL in each branch.

Janne Grunau authored on 2014/07/27 06:29:46
Showing 1 changed files
... ...
@@ -19,6 +19,8 @@ test -n "$slot"    || die "slot not specified"
19 19
 test -n "$repo"    || die "repo not specified"
20 20
 test -d "$samples" || die "samples location not specified"
21 21
 
22
+: ${branch:=master}
23
+
22 24
 lock(){
23 25
     lock=$1/fate.lock
24 26
     (set -C; exec >$lock) 2>/dev/null || return
... ...
@@ -28,14 +30,14 @@ lock(){
28 28
 checkout(){
29 29
     case "$repo" in
30 30
         file:*|/*) src="${repo#file:}"      ;;
31
-        git:*)     git clone --quiet "$repo" "$src" ;;
31
+        git:*)     git clone --quiet --branch "$branch" "$repo" "$src" ;;
32 32
     esac
33 33
 }
34 34
 
35 35
 update()(
36 36
     cd ${src} || return
37 37
     case "$repo" in
38
-        git:*) git fetch --force; git reset --hard origin/master ;;
38
+        git:*) git fetch --force; git reset --hard "origin/$branch" ;;
39 39
     esac
40 40
 )
41 41
 
... ...
@@ -79,7 +81,7 @@ clean(){
79 79
 
80 80
 report(){
81 81
     date=$(date -u +%Y%m%d%H%M%S)
82
-    echo "fate:0:${date}:${slot}:${version}:$1:$2:${comment}" >report
82
+    echo "fate:1:${date}:${slot}:${version}:$1:$2:${branch}:${comment}" >report
83 83
     cat ${build}/config.fate ${build}/tests/data/fate/*.rep >>report
84 84
     test -n "$fate_recv" && $tar report *.log | gzip | $fate_recv
85 85
 }