Files
linuxkit/test/cases/group.sh
Magnus Skjegstad 7bbc39374e tests: add build test for Docker for Mac blueprint
Adds a new test group "linuxkit.build.blueprints" and a test for
building blueprints/docker-for-mac.yml.

Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
2017-06-22 16:30:31 +02:00

49 lines
999 B
Bash

#!/bin/sh
# NAME: linuxkit
# SUMMARY: LinuxKit Regression Tests
# Source libraries. Uncomment if needed/defined
# . "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
group_init() {
# Group initialisation code goes here
[ -r "${LINUXKIT_TMPDIR}" ] && rm -rf "${LINUXKIT_TMPDIR}"
mkdir "${LINUXKIT_TMPDIR}"
echo "export LINUXKIT_EXAMPLES_DIR=${RT_PROJECT_ROOT}/../../examples" >> "${LINUXKIT_TMPDIR}/env.sh"
echo "export LINUXKIT_BLUEPRINTS_DIR=${RT_PROJECT_ROOT}/../../blueprints" >> "${LINUXKIT_TMPDIR}/env.sh"
if rt_label_set "gcp"; then
# If we run GCP tests, make sure it is configured
if [ -z "${CLOUDSDK_CORE_PROJECT}" ]; then
echo "GCP does not seem to be configured"
return 1
fi
fi
return 0
}
group_deinit() {
# Group de-initialisation code goes here
return 0
}
CMD=$1
case $CMD in
init)
group_init
res=$?
;;
deinit)
group_deinit
res=$?
;;
*)
res=1
;;
esac
exit $res