~linaro-toolchain-dev/cbuild/tools

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
#
# Job that runs often, polling builds, branches, and others.
#

# Root of the www directory
. ~/.config/cbuild/toolsrc

timeout="timeout 3600"
#timeout=

cd $ctools

# Update the list of all files and other caches
function allfiles {
	pushd $1 > /dev/null
	find . | sort > /tmp/all-files.txt
	
        # Only update if changed
	! cmp -s all-files.txt /tmp/all-files.txt \
	&& python ~/lib/cbuild-tools/cache-builds.py . \
	&& mv -f /tmp/all-files.txt . \
	&& gzip -9fc --rsyncable all-files.txt > all-files.txt.gz \
	&& gzip -9fc --rsyncable builds.json > builds.json.gz
	
	popd > /dev/null
}

# Tabulate any new benchmarks
./tabulate.sh

# Update the file list cache
allfiles $build
allfiles $benchmarks

# Pull any new merge requests
timeout 14400 python taker.py -f prompt=false

# Add the testsuite diffs to anything new
python2.7 addtestdiffs.py $build/all-files.txt $snapshots $build
python2.7 addtestdiffs.py $benchmarks/all-files.txt $snapshots $benchmarks

# Rebuild all files after the diffs are added
allfiles $build
allfiles $benchmarks

# Poll all interesting Linaro branches
$timeout ./export-git.sh $repos/meta-linaro meta-linaro-0~
$timeout ./pull_branch.sh $repos/gcc-linaro/4.7 gcc-linaro-4.7
$timeout ./pull_branch.sh $repos/gcc-linaro/4.6 gcc-linaro-4.6
$timeout ./pull_branch.sh $repos/crosstool-ng/linaro crosstool-ng-linaro-1.13.1
$timeout ./pull_branch.sh $repos/gdb-linaro/7.5 gdb-linaro-7.5
$timeout ./pull_branch.sh $repos/cortex-strings cortex-strings-1.0
$timeout ./export-git.sh $repos/qemu-linaro qemu-linaro-1.0~
$timeout ./export-git.sh $repos/boot-wrapper boot-wrapper-0~