diff --git a/cabal-testsuite/PackageTests/Configure/cabal.test.hs b/cabal-testsuite/PackageTests/Configure/cabal.test.hs
index afcc00cbf7a8b2211391efc925fabfa2842892f4..cd419e8cee2986a14910ee93dfe002bc6cb4efbc 100644
--- a/cabal-testsuite/PackageTests/Configure/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/Configure/cabal.test.hs
@@ -2,9 +2,26 @@ import Test.Cabal.Prelude
 import Control.Monad.IO.Class
 import Data.Maybe
 import System.Directory
+import System.Environment
+import Data.List (isSuffixOf)
+
 -- Test for 'build-type: Configure' example from the setup manual.
 main = cabalTest $ do
-    hasAutoreconf <- liftIO $ fmap isJust $ findExecutable "autoreconf"
-    skipUnless "no autoreconf" hasAutoreconf
-    _ <- shell "autoreconf" ["-i"]
-    cabal "v2-build" []
+    if isWindows
+    then do
+        (mCI, mSh) <- liftIO $ (,) <$> lookupEnv "CI" <*> lookupEnv "SHELL"
+        case (mCI, mSh) of
+            (Nothing, Nothing) -> skip "Missing $SHELL"
+            (Nothing, Just sh) -> do
+                env <- getTestEnv
+                void $ shell sh [ "-l", "-c", "cd $(cygpath -m '" <> testTmpDir env <> "') && autoreconf -i"]
+                cabal "v2-build" []
+            (Just{}, _) -> do
+                env <- getTestEnv
+                void $ shell "C:\\msys64\\usr\\bin\\bash.exe" [ "-l", "-c", "cd $(cygpath -m '" <> testTmpDir env <> "') && autoreconf -i"]
+                cabal "v2-build" []
+    else do
+        hasAutoreconf <- liftIO $ fmap isJust $ findExecutable "autoreconf"
+        skipUnless "no autoreconf" hasAutoreconf
+        _ <- shell "autoreconf" ["-i"]
+        cabal "v2-build" []
diff --git a/cabal-testsuite/PackageTests/Configure/setup.test.hs b/cabal-testsuite/PackageTests/Configure/setup.test.hs
index 559b88c6ff250162d1a3b5904e9c7c7b8fcfb13f..5eaea387fe612dbb7ff9ca62d5a2d08cce172c3a 100644
--- a/cabal-testsuite/PackageTests/Configure/setup.test.hs
+++ b/cabal-testsuite/PackageTests/Configure/setup.test.hs
@@ -2,9 +2,25 @@ import Test.Cabal.Prelude
 import Control.Monad.IO.Class
 import Data.Maybe
 import System.Directory
+import System.Environment
+
 -- Test for 'build-type: Configure' example from the setup manual.
-main = setupTest $ do
-    hasAutoreconf <- liftIO $ fmap isJust $ findExecutable "autoreconf"
-    skipUnless "no autoreconf" hasAutoreconf
-    _ <- shell "autoreconf" ["-i"]
-    setup_build []
+main = setupTest $
+    if isWindows
+    then do
+        (mCI, mSh) <- liftIO $ (,) <$> lookupEnv "CI" <*> lookupEnv "SHELL"
+        case (mCI, mSh) of
+            (Nothing, Nothing) -> skip "Missing $SHELL"
+            (Nothing, Just sh) -> do
+                env <- getTestEnv
+                void $ shell sh [ "-l", "-c", "cd $(cygpath -m '" <> testTmpDir env <> "') && autoreconf -i"]
+                setup_build []
+            (Just{}, _) -> do
+                env <- getTestEnv
+                void $ shell "C:\\msys64\\usr\\bin\\bash.exe" [ "-l", "-c", "cd $(cygpath -m '" <> testTmpDir env <> "') && autoreconf -i"]
+                setup_build []
+    else do
+        hasAutoreconf <- liftIO $ fmap isJust $ findExecutable "autoreconf"
+        skipUnless "no autoreconf" hasAutoreconf
+        _ <- shell "autoreconf" ["-i"]
+        setup_build []