Changes between Version 10 and Version 11 of WorkingConventions/Bisection


Ignore:
Timestamp:
Jul 7, 2017 3:15:57 PM (2 years ago)
Author:
bgamari
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WorkingConventions/Bisection

    v10 v11  
    3232rev=$(git rev-parse HEAD)
    3333
    34 function skip_commit() {
    35     exit 125
    36 }
     34# Bisection step return codes
     35function skip_commit() { exit 125; }
     36function commit_good() { exit 0; }
     37function commit_bad() { exit 1; }
     38function stop_bisection() { exit 255; }
    3739
    3840function log() {
     
    4547    log "Commit $rev: $step = $@"
    4648    $@ 2>&1 | tee  $logs/$rev-$step.log
    47     ret=$?
     49    ret="${PIPESTATUS[0]}"
    4850    log "Commit $rev: $step = $ret"
    4951    return $ret
     
    5355    do_it submodules git submodule update || skip_commit
    5456    # We run `make` twice as sometimes it will spuriously fail with -j
    55     if [ "x$ALWAYS_CLEAN" == "x0" ]; then
     57    if [ -z "$ALWAYS_CLEAN" -o "x$ALWAYS_CLEAN" == "x0" ]; then
    5658        # First try building without cleaning, if that fails then clean and try again
    5759        do_it ghc1 make $make_opts || \
     
    7375    tree=$HOME/trees/cabal
    7476    cd $tree
    75     do_it "clean-test" rm -R dist-newstyle
     77    #do_it "clean-test" rm -R dist-newstyle
    7678    do_it "build-test" cabal new-build cabal-install --disable-library-profiling --allow-newer=time --with-compiler=$ghc
    7779    do_it "make-links" /home/ben/.env/bin/mk-cabal-bin.sh
     
    8183    if [ "x$?" = "x124" ]; then
    8284        log "Commit $rev: failed"
    83         exit 1;
     85        commit_bad
    8486    else
    8587        log "Commit $rev: passed"
    86         exit 0;
     88        commit_good
    8789    fi
    8890}