mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
Cache build deps prior to running tests
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
GOTEST_TAGS="nomad_test lxc"
|
||||
GOTEST_TAGS="nomad_test"
|
||||
if [[ $(uname) == "Linux" ]]; then
|
||||
if pkg-config --exists lxc; then
|
||||
GOTEST_TAGS="$GOTEST_TAGS lxc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create a temp dir and clean it up on exit
|
||||
TEMPDIR=`mktemp -d -t nomad-test.XXX`
|
||||
@@ -9,7 +14,7 @@ trap "rm -rf $TEMPDIR" EXIT HUP INT QUIT TERM
|
||||
|
||||
# Build the Nomad binary for the API tests
|
||||
echo "--> Building nomad"
|
||||
go build -tags "$GOTEST_TAGS" -o $TEMPDIR/nomad || exit 1
|
||||
go build -i -tags "$GOTEST_TAGS" -o $TEMPDIR/nomad || exit 1
|
||||
|
||||
# Run the tests
|
||||
echo "--> Running tests"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
export PING_SLEEP=30
|
||||
export PING_SLEEP=60
|
||||
bash -c "while true; do echo \$(date) - building ...; sleep $PING_SLEEP; done" &
|
||||
PING_LOOP_PID=$!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user