summaryrefslogtreecommitdiff
path: root/configure.hs
diff options
context:
space:
mode:
Diffstat (limited to 'configure.hs')
-rw-r--r--configure.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.hs b/configure.hs
index 3b3626dd2..772df3e38 100644
--- a/configure.hs
+++ b/configure.hs
@@ -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