Signed-off-by: John Howard <jhoward@microsoft.com>
| ... | ... |
@@ -1,21 +1,27 @@ |
| 1 | 1 |
#!/bin/bash |
| 2 | 2 |
|
| 3 |
-trap - EXIT # reset EXIT trap applied in .integration-daemon-start |
|
| 3 |
+if [ ! "$(go env GOOS)" = 'windows' ]; then |
|
| 4 |
+ trap - EXIT # reset EXIT trap applied in .integration-daemon-start |
|
| 4 | 5 |
|
| 5 |
-for pidFile in $(find "$DEST" -name docker.pid); do |
|
| 6 |
- pid=$(set -x; cat "$pidFile") |
|
| 7 |
- ( set -x; kill "$pid" ) |
|
| 8 |
- if ! wait "$pid"; then |
|
| 9 |
- echo >&2 "warning: PID $pid from $pidFile had a nonzero exit code" |
|
| 10 |
- fi |
|
| 11 |
-done |
|
| 6 |
+ for pidFile in $(find "$DEST" -name docker.pid); do |
|
| 7 |
+ pid=$(set -x; cat "$pidFile") |
|
| 8 |
+ ( set -x; kill "$pid" ) |
|
| 9 |
+ if ! wait "$pid"; then |
|
| 10 |
+ echo >&2 "warning: PID $pid from $pidFile had a nonzero exit code" |
|
| 11 |
+ fi |
|
| 12 |
+ done |
|
| 12 | 13 |
|
| 13 |
-if [ -z "$DOCKER_TEST_HOST" ]; then |
|
| 14 |
- # Stop apparmor if it is enabled |
|
| 15 |
- if [ -e "/sys/module/apparmor/parameters/enabled" ] && [ "$(cat /sys/module/apparmor/parameters/enabled)" == "Y" ]; then |
|
| 16 |
- ( |
|
| 17 |
- set -x |
|
| 18 |
- /etc/init.d/apparmor stop |
|
| 19 |
- ) |
|
| 14 |
+ if [ -z "$DOCKER_TEST_HOST" ]; then |
|
| 15 |
+ # Stop apparmor if it is enabled |
|
| 16 |
+ if [ -e "/sys/module/apparmor/parameters/enabled" ] && [ "$(cat /sys/module/apparmor/parameters/enabled)" == "Y" ]; then |
|
| 17 |
+ ( |
|
| 18 |
+ set -x |
|
| 19 |
+ /etc/init.d/apparmor stop |
|
| 20 |
+ ) |
|
| 21 |
+ fi |
|
| 20 | 22 |
fi |
| 23 |
+else |
|
| 24 |
+ # Note this script is not actionable on Windows to Linux CI. Instead the |
|
| 25 |
+ # DIND daemon under test is torn down by the Jenkins tear-down script |
|
| 26 |
+ echo "INFO: Not stopping daemon on Windows CI" |
|
| 21 | 27 |
fi |