don't test host in configure
That'll fail when building offline.
This commit is contained in:
parent
0cf152b88b
commit
60fba9097a
2 changed files with 4 additions and 8 deletions
|
@ -27,7 +27,6 @@ tests =
|
||||||
, TestCase "bup" $ testCmd "bup" "bup --version >/dev/null"
|
, TestCase "bup" $ testCmd "bup" "bup --version >/dev/null"
|
||||||
, TestCase "gpg" $ testCmd "gpg" "gpg --version >/dev/null"
|
, TestCase "gpg" $ testCmd "gpg" "gpg --version >/dev/null"
|
||||||
, TestCase "lsof" $ testCmd "lsof" "lsof -v >/dev/null 2>&1"
|
, TestCase "lsof" $ testCmd "lsof" "lsof -v >/dev/null 2>&1"
|
||||||
, TestCase "host" $ testCmd "host" "host localhost >/dev/null 2>&1"
|
|
||||||
, TestCase "ssh connection caching" getSshConnectionCaching
|
, TestCase "ssh connection caching" getSshConnectionCaching
|
||||||
] ++ shaTestCases
|
] ++ shaTestCases
|
||||||
[ (1, "da39a3ee5e6b4b0d3255bfef95601890afd80709")
|
[ (1, "da39a3ee5e6b4b0d3255bfef95601890afd80709")
|
||||||
|
|
|
@ -16,7 +16,6 @@ module Utility.SRV (
|
||||||
lookupSRV,
|
lookupSRV,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import qualified Build.SysConfig
|
|
||||||
import Utility.Process
|
import Utility.Process
|
||||||
import Utility.Exception
|
import Utility.Exception
|
||||||
import Utility.PartialPrelude
|
import Utility.PartialPrelude
|
||||||
|
@ -86,12 +85,10 @@ lookupSRV = lookupSRVHost
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lookupSRVHost :: SRV -> IO [HostPort]
|
lookupSRVHost :: SRV -> IO [HostPort]
|
||||||
lookupSRVHost (SRV srv)
|
lookupSRVHost (SRV srv) = catchDefaultIO [] $
|
||||||
| Build.SysConfig.host = catchDefaultIO [] $
|
|
||||||
parseSrvHost <$> readProcessEnv "host" ["-t", "SRV", "--", srv]
|
parseSrvHost <$> readProcessEnv "host" ["-t", "SRV", "--", srv]
|
||||||
-- clear environment, to avoid LANG affecting output
|
-- clear environment, to avoid LANG affecting output
|
||||||
(Just [])
|
(Just [])
|
||||||
| otherwise = return []
|
|
||||||
|
|
||||||
parseSrvHost :: String -> [HostPort]
|
parseSrvHost :: String -> [HostPort]
|
||||||
parseSrvHost = orderHosts . catMaybes . map parse . lines
|
parseSrvHost = orderHosts . catMaybes . map parse . lines
|
||||||
|
|
Loading…
Add table
Reference in a new issue