<NME> run-sh-in-container.sh
<BEF> #!/bin/bash
set -e

testDir="$(readlink -f "$(dirname "$BASH_SOURCE")")"
runDir="$(dirname "$(readlink -f "$BASH_SOURCE")")"

source "$runDir/run-in-container.sh" "$testDir" "$1" sh ./container.sh

<MSG> Merge pull request #7888 from infosiftr/windows-tests

Adjust test harness to run many tests successfully on Windows
<DFF> @@ -1,7 +1,19 @@
-#!/bin/bash
-set -e
+#!/usr/bin/env bash
+set -Eeuo pipefail
 
-testDir="$(readlink -f "$(dirname "$BASH_SOURCE")")"
-runDir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+testDir="$(dirname "$BASH_SOURCE")"
+testDir="$(readlink -f "$testDir")"
+runDir="$(readlink -f "$BASH_SOURCE")"
+runDir="$(dirname "$runDir")"
 
-source "$runDir/run-in-container.sh" "$testDir" "$1" sh ./container.sh
+case "$1" in
+	*windowsservercore* | *nanoserver*)
+		[ -f "$testDir/container.cmd" ]
+		source "$runDir/run-in-container.sh" "$testDir" "$1" cmd /Q /S /C '.\container.cmd'
+		;;
+
+	*)
+		[ -f "$testDir/container.sh" ]
+		source "$runDir/run-in-container.sh" "$testDir" "$1" sh ./container.sh
+		;;
+esac

Merge pull request #7888 from infosiftr/windows-tests