2014-01-21 20:21:56 -05:00
|
|
|
#!/usr/bin/env bash
|
2013-10-10 20:46:09 -04:00
|
|
|
|
|
|
|
set -x
|
|
|
|
COMMIT=${1-HEAD}
|
|
|
|
REPO=${2-http://github.com/dotcloud/docker}
|
|
|
|
BRANCH=${3-master}
|
|
|
|
|
|
|
|
# Compute test paths
|
2013-10-19 01:33:16 -04:00
|
|
|
DOCKER_PATH=/go/src/github.com/dotcloud/docker
|
2013-10-10 20:46:09 -04:00
|
|
|
|
2013-11-06 23:05:26 -05:00
|
|
|
# Timestamp
|
|
|
|
echo
|
|
|
|
date; echo
|
|
|
|
|
2013-10-10 20:46:09 -04:00
|
|
|
# Fetch latest master
|
2013-10-27 15:13:03 -04:00
|
|
|
cd /
|
2013-10-19 01:33:16 -04:00
|
|
|
rm -rf /go
|
2013-10-27 15:13:03 -04:00
|
|
|
git clone -q -b master http://github.com/dotcloud/docker $DOCKER_PATH
|
2013-10-10 20:46:09 -04:00
|
|
|
cd $DOCKER_PATH
|
|
|
|
|
|
|
|
# Merge commit
|
|
|
|
git fetch -q "$REPO" "$BRANCH"
|
2013-11-06 23:05:26 -05:00
|
|
|
git merge --no-edit $COMMIT || exit 255
|
2013-10-10 20:46:09 -04:00
|
|
|
|
|
|
|
# Test commit
|
2013-10-27 15:13:03 -04:00
|
|
|
./hack/make.sh test; exit_status=$?
|
2013-10-10 20:46:09 -04:00
|
|
|
|
2013-10-19 01:33:16 -04:00
|
|
|
# Display load if test fails
|
2013-11-06 23:05:26 -05:00
|
|
|
if [ $exit_status -ne 0 ] ; then
|
2013-10-19 01:33:16 -04:00
|
|
|
uptime; echo; free
|
|
|
|
fi
|
|
|
|
|
2013-10-10 20:46:09 -04:00
|
|
|
exit $exit_status
|