add a configure check for StatFS
This way, the build log will indicate whether StatFS can be relied on. I've tested all the failing architectures now, and on all of them, the StatFS code now returns Nothing, rather than Just nonsense. Also, if annex.diskreserve is set on a platform where StatFS is not working, git-annex will complain. Also, the Makefile was missing the sources target used when building with cabal.
This commit is contained in:
parent
0eed604446
commit
81856c3175
5 changed files with 28 additions and 4 deletions
|
@ -2,9 +2,11 @@
|
|||
|
||||
import System.Directory
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import System.Cmd.Utils
|
||||
|
||||
import Build.TestConfig
|
||||
import Utility.StatFS
|
||||
|
||||
tests :: [TestCase]
|
||||
tests =
|
||||
|
@ -21,6 +23,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 "StatFS" testStatFS
|
||||
] ++ shaTestCases [1, 256, 512, 224, 384]
|
||||
|
||||
shaTestCases :: [Int] -> [TestCase]
|
||||
|
@ -63,6 +66,11 @@ getGitVersion = do
|
|||
let version = last $ words $ head $ lines s
|
||||
return $ Config "gitversion" (StringConfig version)
|
||||
|
||||
testStatFS :: Test
|
||||
testStatFS = do
|
||||
s <- getFileSystemStats "."
|
||||
return $ Config "statfs_sane" $ BoolConfig $ isJust s
|
||||
|
||||
{- Set up cabal file with version. -}
|
||||
cabalSetup :: IO ()
|
||||
cabalSetup = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue