summaryrefslogtreecommitdiff
path: root/tools/proof
blob: aaf8a6b6b504040fa9af4c5cf6131b885036aab0 (plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh

set -e

function build_and_test() {
    NAME=--$1

    echo %%% Configuring $NAME %%%
    if ! tools/myacprep $NAME; then
	echo %%% FAILED to configure $NAME %%%
	exit 1
    fi

    DIR=$HOME/Products/ledger-$1

    echo %%% Cleaning $NAME %%%
    if ! (cd $DIR && make clean); then
	echo %%% FAILED to clean $NAME %%%
	exit 1
    fi

    echo %%% Building $NAME %%%
    if ! (cd $DIR && make); then
	echo %%% FAILED to build $NAME %%%
	exit 1
    fi

    if [ "$NAME" = "--gcov" ]; then
	echo %%% Testing $NAME %%%
	if ! (cd $DIR && make check); then
	    echo %%% FAILED to test $NAME %%%
	    exit 1
	fi
    else
	echo %%% Testing $NAME %%%
	if ! (cd $DIR && make fullcheck); then
	    echo %%% FAILED to test $NAME %%%
	    exit 1
	fi
    fi
}

echo %%% Copying src %%%
rsync -a --delete ~/Projects/ledger/ ~/Products/ledger-src/
cd ~/Products/ledger-src

echo %%% Removing old opt %%%
rm -fr ~/Products/ledger-opt
build_and_test opt

echo %%% Removing old gcov %%%
rm -fr ~/Products/ledger-gcov
build_and_test gcov

echo %%% Removing old std %%%
rm -fr ~/Products/ledger-std
build_and_test std

echo %%% Removing old debug %%%
rm -fr ~/Products/ledger-debug
build_and_test debug

echo %%% Building release-distcheck %%%
if ! (cd ~/Products/ledger-std && make release-distcheck); then
    echo %%% FAILED to build release-distcheck %%%
    exit 1
fi