File tree Expand file tree Collapse file tree 2 files changed +42
-9
lines changed
cabal-testsuite/PackageTests/Configure Expand file tree Collapse file tree 2 files changed +42
-9
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,26 @@ import Test.Cabal.Prelude
22import Control.Monad.IO.Class
33import Data.Maybe
44import System.Directory
5+ import System.Environment
6+ import Data.List (isSuffixOf )
7+
58-- Test for 'build-type: Configure' example from the setup manual.
69main = cabalTest $ do
7- hasAutoreconf <- liftIO $ fmap isJust $ findExecutable " autoreconf"
8- skipUnless " no autoreconf" hasAutoreconf
9- _ <- shell " autoreconf" [" -i" ]
10- cabal " v2-build" []
10+ if isWindows
11+ then do
12+ (mCI, mSh) <- liftIO $ (,) <$> lookupEnv " CI" <*> lookupEnv " SHELL"
13+ case (mCI, mSh) of
14+ (Nothing , Nothing ) -> skip " Missing $SHELL"
15+ (Nothing , Just sh) -> do
16+ env <- getTestEnv
17+ void $ shell sh [ " -l" , " -c" , " cd $(cygpath -m '" <> testTmpDir env <> " ') && autoreconf -i" ]
18+ cabal " v2-build" []
19+ (Just {}, _) -> do
20+ env <- getTestEnv
21+ void $ shell " C:\\ msys64\\ usr\\ bin\\ bash.exe" [ " -l" , " -c" , " cd $(cygpath -m '" <> testTmpDir env <> " ') && autoreconf -i" ]
22+ cabal " v2-build" []
23+ else do
24+ hasAutoreconf <- liftIO $ fmap isJust $ findExecutable " autoreconf"
25+ skipUnless " no autoreconf" hasAutoreconf
26+ _ <- shell " autoreconf" [" -i" ]
27+ cabal " v2-build" []
Original file line number Diff line number Diff line change @@ -2,9 +2,25 @@ import Test.Cabal.Prelude
22import Control.Monad.IO.Class
33import Data.Maybe
44import System.Directory
5+ import System.Environment
6+
57-- Test for 'build-type: Configure' example from the setup manual.
6- main = setupTest $ do
7- hasAutoreconf <- liftIO $ fmap isJust $ findExecutable " autoreconf"
8- skipUnless " no autoreconf" hasAutoreconf
9- _ <- shell " autoreconf" [" -i" ]
10- setup_build []
8+ main = setupTest $
9+ if isWindows
10+ then do
11+ (mCI, mSh) <- liftIO $ (,) <$> lookupEnv " CI" <*> lookupEnv " SHELL"
12+ case (mCI, mSh) of
13+ (Nothing , Nothing ) -> skip " Missing $SHELL"
14+ (Nothing , Just sh) -> do
15+ env <- getTestEnv
16+ void $ shell sh [ " -l" , " -c" , " cd $(cygpath -m '" <> testTmpDir env <> " ') && autoreconf -i" ]
17+ setup_build []
18+ (Just {}, _) -> do
19+ env <- getTestEnv
20+ void $ shell " C:\\ msys64\\ usr\\ bin\\ bash.exe" [ " -l" , " -c" , " cd $(cygpath -m '" <> testTmpDir env <> " ') && autoreconf -i" ]
21+ setup_build []
22+ else do
23+ hasAutoreconf <- liftIO $ fmap isJust $ findExecutable " autoreconf"
24+ skipUnless " no autoreconf" hasAutoreconf
25+ _ <- shell " autoreconf" [" -i" ]
26+ setup_build []
You can’t perform that action at this time.
0 commit comments