diff options
author | John Wiegley <johnw@newartisans.com> | 2009-03-02 04:43:49 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-03-02 04:43:49 -0400 |
commit | 5d214e515f38c68faf65b2200e1c00f5a1b0b734 (patch) | |
tree | 2fea02116ff5fb585187ed42be97e9dcf371f092 /tools/proof | |
parent | 67b9c917e6a0c434646d3190d3ea4586c6f548da (diff) | |
download | fork-ledger-5d214e515f38c68faf65b2200e1c00f5a1b0b734.tar.gz fork-ledger-5d214e515f38c68faf65b2200e1c00f5a1b0b734.tar.bz2 fork-ledger-5d214e515f38c68faf65b2200e1c00f5a1b0b734.zip |
Refactored tools/proof
Diffstat (limited to 'tools/proof')
-rwxr-xr-x | tools/proof | 100 |
1 files changed, 46 insertions, 54 deletions
diff --git a/tools/proof b/tools/proof index 3cf7f64c..7cf52598 100755 --- a/tools/proof +++ b/tools/proof @@ -2,62 +2,54 @@ set -e -echo %%% Configuring --opt %%% -if ! tools/myacprep --opt; then - echo %%% FAILED to configure --opt %%% - exit 1 -fi - -echo %%% Building --opt %%% -if ! (cd ~/Products/ledger-opt && make clean fullcheck); then - echo %%% FAILED to build --opt %%% - exit 1 -fi - -echo %%% Configuring --gprof %%% -if ! tools/myacprep --gprof; then - echo %%% FAILED to configure --gprof %%% - exit 1 -fi - -echo %%% Building --gprof %%% -if ! (cd ~/Products/ledger-gprof && make clean fullcheck); then - echo %%% FAILED to build --gprof %%% - exit 1 -fi - -echo %%% Configuring --gcov %%% -if ! tools/myacprep --gcov; then - echo %%% FAILED to configure --gcov %%% - exit 1 -fi - -echo %%% Building --gcov %%% -if ! (cd ~/Products/ledger-gcov && make clean fullcheck); then - echo %%% FAILED to build --gcov %%% - exit 1 -fi - -echo %%% Configuring std %%% -if ! tools/myacprep; then - echo %%% FAILED to configure std %%% - exit 1 -fi - -echo %%% Building std %%% -if ! (cd ~/Products/ledger-opt && make clean fullcheck); then - echo %%% FAILED to build std %%% - exit 1 -fi - -echo %%% Building default %%% -if ! (cd ~/Products/ledger && make clean fullcheck); then - echo %%% FAILED to build default %%% - exit 1 -fi +function build_and_test() { + if [ ! $1 = std ]; then + NAME=--$1 + + echo %%% Configuring $NAME %%% + if ! tools/myacprep $NAME; then + echo %%% FAILED to configure $NAME %%% + exit 1 + fi + + DIR=$HOME/Products/ledger-$1 + else + NAME="$1" + DIR=$HOME/Products/ledger-$1 + + echo %%% Configuring $NAME %%% + if ! tools/myacprep --output $DIR; then + echo %%% FAILED to configure $NAME %%% + exit 1 + fi + fi + + 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 + + echo %%% Testing $NAME %%% + if ! (cd $DIR && make fullcheck); then + echo %%% FAILED to test $NAME %%% + exit 1 + fi +} + +build_and_test opt +build_and_test gprof +build_and_test gcov +build_and_test std echo %%% Building release-distcheck %%% -if ! (cd ~/Products/ledger-opt && make release-distcheck); then +if ! (cd ~/Products/ledger-std && make release-distcheck); then echo %%% FAILED to build release-distcheck %%% exit 1 fi |