configure: Check if ssh connection caching is supported by the installed version of ssh and default annex.sshcaching accordingly.

This commit is contained in:
Joey Hess 2012-02-25 19:15:29 -04:00
parent c3fbe07d7a
commit 12b89a3eb8
8 changed files with 27 additions and 7 deletions

View file

@ -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 "."