diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-25 19:15:29 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-25 19:15:29 -0400 |
commit | 12b89a3eb81fdac92ec3ea9633bbd9a7d6a72adb (patch) | |
tree | ea35600752cf95dab1522257ee722d29b39fee27 /configure.hs | |
parent | c3fbe07d7ad03944d0967ebfa2b8f65cbc2ad5dc (diff) |
configure: Check if ssh connection caching is supported by the installed version of ssh and default annex.sshcaching accordingly.
Diffstat (limited to 'configure.hs')
-rw-r--r-- | configure.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.hs b/configure.hs index 772df3e38..9dcc6a501 100644 --- a/configure.hs +++ b/configure.hs @@ -4,9 +4,11 @@ import System.Directory import Data.List import Data.Maybe import System.Cmd.Utils +import Control.Applicative import Build.TestConfig import Utility.StatFS +import Utility.SafeCommand tests :: [TestCase] tests = @@ -23,6 +25,7 @@ tests = , TestCase "wget" $ testCmd "wget" "wget --version >/dev/null" , TestCase "bup" $ testCmd "bup" "bup --version >/dev/null" , TestCase "gpg" $ testCmd "gpg" "gpg --version >/dev/null" + , TestCase "ssh connection caching" getSshConnectionCaching , TestCase "StatFS" testStatFS ] ++ shaTestCases [1, 256, 512, 224, 384] @@ -66,6 +69,10 @@ getGitVersion = do let version = last $ words $ head $ lines s return $ Config "gitversion" (StringConfig version) +getSshConnectionCaching :: Test +getSshConnectionCaching = Config "sshconnectioncaching" . BoolConfig <$> + boolSystem "sh" [Param "-c", Param "ssh -o ControlPersist=yes -V >/dev/null 2>/dev/null"] + testStatFS :: Test testStatFS = do s <- getFileSystemStats "." |