summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-05-31 23:15:40 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-05-31 23:15:40 -0400
commit2183fd2abd95b6deaa9baef47e2f9c5f865123e1 (patch)
treead1ed21da1ba472bfe441401291932bd1ba378eb /Build
parentf5de183c7168627e9bd969aa48f8215f411bc507 (diff)
Require that the SHA256 backend can be used when building, since it's the default.
Diffstat (limited to 'Build')
-rw-r--r--Build/Configure.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Build/Configure.hs b/Build/Configure.hs
index 341b8840d..86a347924 100644
--- a/Build/Configure.hs
+++ b/Build/Configure.hs
@@ -26,15 +26,16 @@ tests =
, TestCase "bup" $ testCmd "bup" "bup --version >/dev/null"
, TestCase "gpg" $ testCmd "gpg" "gpg --version >/dev/null"
, TestCase "ssh connection caching" getSshConnectionCaching
- ] ++ shaTestCases [1, 256, 512, 224, 384]
+ ] ++ shaTestCases False [1, 512, 224, 384] ++ shaTestCases True [256]
-shaTestCases :: [Int] -> [TestCase]
-shaTestCases l = map make l
+shaTestCases :: Bool -> [Int] -> [TestCase]
+shaTestCases required l = map make l
where make n =
let
cmds = map (\x -> "sha" ++ show n ++ x) ["", "sum"]
key = "sha" ++ show n
- in TestCase key $ maybeSelectCmd key cmds "</dev/null"
+ selector = if required then selectCmd else maybeSelectCmd
+ in TestCase key $ selector key cmds "</dev/null"
tmpDir :: String
tmpDir = "tmp"