Merge pull request #19102 from Microsoft/jjh/integ-daemon-stop

Windows CI: No integration daemon stop
This commit is contained in:
Sebastiaan van Stijn 2016-01-05 20:52:51 +01:00
commit 2b489450d7
1 changed files with 21 additions and 15 deletions

View File

@ -1,21 +1,27 @@
#!/bin/bash #!/bin/bash
trap - EXIT # reset EXIT trap applied in .integration-daemon-start if [ ! "$(go env GOOS)" = 'windows' ]; then
trap - EXIT # reset EXIT trap applied in .integration-daemon-start
for pidFile in $(find "$DEST" -name docker.pid); do for pidFile in $(find "$DEST" -name docker.pid); do
pid=$(set -x; cat "$pidFile") pid=$(set -x; cat "$pidFile")
( set -x; kill "$pid" ) ( set -x; kill "$pid" )
if ! wait "$pid"; then if ! wait "$pid"; then
echo >&2 "warning: PID $pid from $pidFile had a nonzero exit code" echo >&2 "warning: PID $pid from $pidFile had a nonzero exit code"
fi fi
done done
if [ -z "$DOCKER_TEST_HOST" ]; then if [ -z "$DOCKER_TEST_HOST" ]; then
# Stop apparmor if it is enabled # Stop apparmor if it is enabled
if [ -e "/sys/module/apparmor/parameters/enabled" ] && [ "$(cat /sys/module/apparmor/parameters/enabled)" == "Y" ]; then if [ -e "/sys/module/apparmor/parameters/enabled" ] && [ "$(cat /sys/module/apparmor/parameters/enabled)" == "Y" ]; then
( (
set -x set -x
/etc/init.d/apparmor stop /etc/init.d/apparmor stop
) )
fi
fi fi
else
# Note this script is not actionable on Windows to Linux CI. Instead the
# DIND daemon under test is torn down by the Jenkins tear-down script
echo "INFO: Not stopping daemon on Windows CI"
fi fi