ledger/tools/proof
John Wiegley 6f95dfa6be Modified the behavior of tools/proof
It now uses a copy of the source tree, so that I can keep working while
proof is running.  It takes a while.
2009-03-08 02:07:49 -04:00

67 lines
1.3 KiB
Bash
Executable file

#!/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