1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/infrastructure/docker-ci/docker-test/test_docker.sh
Kim BKC Carlbacker b1953baba2 This should make all bash-scripts run on pretty much any posix-system (with bash installed ofc...)
Docker-DCO-1.1-Signed-off-by: Kim BKC Carlbacker <kim.carlbacker@gmail.com> (github: bkcsoft)
2014-01-22 02:21:56 +01:00

33 lines
577 B
Bash
Executable file

#!/usr/bin/env bash
set -x
COMMIT=${1-HEAD}
REPO=${2-http://github.com/dotcloud/docker}
BRANCH=${3-master}
# Compute test paths
DOCKER_PATH=/go/src/github.com/dotcloud/docker
# Timestamp
echo
date; echo
# Fetch latest master
cd /
rm -rf /go
git clone -q -b master http://github.com/dotcloud/docker $DOCKER_PATH
cd $DOCKER_PATH
# Merge commit
git fetch -q "$REPO" "$BRANCH"
git merge --no-edit $COMMIT || exit 255
# Test commit
./hack/make.sh test; exit_status=$?
# Display load if test fails
if [ $exit_status -ne 0 ] ; then
uptime; echo; free
fi
exit $exit_status