-
Notifications
You must be signed in to change notification settings - Fork 8
/
test-launch.sh
executable file
·36 lines (28 loc) · 1.14 KB
/
test-launch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Script that launches tests from the repo https://github.ibm.com/powercloud/dockertest
set -eu
# Start the dockerd and wait for it to start
${PATH_SCRIPTS}/dockerctl.sh start
#Calling dockerinfo to trace the versions info (docker and deps)
#TODO addsome automated checks to make sure we are testing the proper package versions
echo "= Docker info for ${DISTRO_NAME} start ="
docker info
echo "= Docker info for ${DISTRO_NAME} end ="
echo ""
# Run the docker test suite that consists of 3 tests
echo "= Docker test suite for ${DISTRO_NAME} ="
export GOPATH=${WORKSPACE}/test:/go
export PATH="/workspace/test/bin:$PATH"
export GO111MODULE=auto
cd /workspace/test/src/github.ibm.com/powercloud/dockertest
go install gotest.tools/gotestsum@v1.7.0
echo "* Go version:"
go version
if [[ ${DISTRO_NAME} == "alpine" ]]
then
gotestsum --format standard-verbose --junitfile ${DIR_TEST}/junit-tests-${DISTRO_NAME}.xml --debug -- ./tests/${DISTRO_NAME}
else
gotestsum --format standard-verbose --junitfile ${DIR_TEST}/junit-tests-${DISTRO_NAME}-${DISTRO_VERS}.xml --debug -- ./tests/${DISTRO_NAME}
fi
echo "== End of the docker test suite =="
exit 0