Code review comment for lp:~elopio/snappy/examples1

Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :

The attempt to merge lp:~elopio/snappy/examples1 into lp:snappy failed. Below is the output from the failed tests.

Checking docs
Checking formatting
Formatting wrong in following files
_integration-tests/tests/examples_test.go

Crushing failure and despair.

# we always run in a fresh dir in tarmac
export GOPATH=$(mktemp -d)
trap 'rm -rf "$GOPATH"' EXIT

# this is a hack, but not sure tarmac is golang friendly
mkdir -p $GOPATH/src/launchpad.net/snappy
cp -a . $GOPATH/src/launchpad.net/snappy/
cd $GOPATH/src/launchpad.net/snappy

sh -v ./run-checks
#!/bin/sh

set -eu

if which goctest >/dev/null; then
    goctest="goctest"
else
    goctest="go test"
fi

QUICK=""
if [ "${1:-}" = "--quick" ]; then
    QUICK=yes
fi

endmsg() {
    if [ $? -eq 0 ]; then
        p="success.txt"
        m="All good, what could possibly go wrong."
    else
        p="failure.txt"
        m="Crushing failure and despair."
    fi
    echo
    if [ -t 1 -a -z "$QUICK" ]; then
        cat "data/$p"
    else
        echo "$m"
    fi
}
trap endmsg EXIT

echo Checking docs
./mdlint.py docs/*.md

echo Checking formatting
fmt=$(gofmt -l .)

if [ -n "$fmt" ]; then
    echo "Formatting wrong in following files"
    echo "$fmt"
    exit 1
fi

« Back to merge proposal