add tests for uuid and xargs -0
This commit is contained in:
parent
f3f3bc6cae
commit
68183b4721
2 changed files with 13 additions and 2 deletions
13
configure.hs
13
configure.hs
|
@ -20,6 +20,8 @@ tests = [
|
||||||
TestDesc "cp -a" "cp_a" $ testCp "-a"
|
TestDesc "cp -a" "cp_a" $ testCp "-a"
|
||||||
, TestDesc "cp -p" "cp_p" $ testCp "-p"
|
, TestDesc "cp -p" "cp_p" $ testCp "-p"
|
||||||
, TestDesc "cp --reflink=auto" "cp_reflink_auto" $ testCp "--reflink=auto"
|
, TestDesc "cp --reflink=auto" "cp_reflink_auto" $ testCp "--reflink=auto"
|
||||||
|
, TestDesc "uuid" "uuid" $ requireCommand "uuid" "uuid"
|
||||||
|
, TestDesc "xargs -0" "xargs_0" $ requireCommand "xargs -0" "xargs -0 </dev/null"
|
||||||
]
|
]
|
||||||
|
|
||||||
tmpDir :: String
|
tmpDir :: String
|
||||||
|
@ -29,7 +31,16 @@ testFile :: String
|
||||||
testFile = tmpDir ++ "/testfile"
|
testFile = tmpDir ++ "/testfile"
|
||||||
|
|
||||||
quiet :: String -> String
|
quiet :: String -> String
|
||||||
quiet s = s ++ " 2>/dev/null"
|
quiet s = s ++ " >/dev/null 2>&1"
|
||||||
|
|
||||||
|
requireCommand :: String -> String -> Test
|
||||||
|
requireCommand command cmdline = do
|
||||||
|
ret <- testCmd $ quiet cmdline
|
||||||
|
if (ret)
|
||||||
|
then return True
|
||||||
|
else do
|
||||||
|
testEnd False
|
||||||
|
error $ "** the " ++ command ++ " command is required to use git-annex"
|
||||||
|
|
||||||
testCp :: String -> Test
|
testCp :: String -> Test
|
||||||
testCp option = testCmd $ quiet $ "cp " ++ option ++ " " ++ testFile ++
|
testCp option = testCmd $ quiet $ "cp " ++ option ++ " " ++ testFile ++
|
||||||
|
|
2
debian/control
vendored
2
debian/control
vendored
|
@ -1,7 +1,7 @@
|
||||||
Source: git-annex
|
Source: git-annex
|
||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Build-Depends: debhelper (>= 7.0.50), ghc6, libghc6-missingh-dev, libghc6-testpack-dev, ikiwiki
|
Build-Depends: debhelper (>= 7.0.50), ghc6, libghc6-missingh-dev, libghc6-testpack-dev, ikiwiki, uuid
|
||||||
Maintainer: Joey Hess <joeyh@debian.org>
|
Maintainer: Joey Hess <joeyh@debian.org>
|
||||||
Standards-Version: 3.9.1
|
Standards-Version: 3.9.1
|
||||||
Vcs-Git: git://git.kitenet.net/git-annex
|
Vcs-Git: git://git.kitenet.net/git-annex
|
||||||
|
|
Loading…
Reference in a new issue