Test that uuid -m works, falling back to plain uuid if not.

This commit is contained in:
Joey Hess 2012-09-25 10:48:20 -04:00
parent bbe1f86325
commit bc83179a76
3 changed files with 3 additions and 7 deletions

View file

@ -36,12 +36,7 @@ genUUID = gen . lines <$> readProcess command params
where
gen [] = error $ "no output from " ++ command
gen (l:_) = toUUID l
command = SysConfig.uuid
params
-- request a random uuid be generated
| command == "uuid" = ["-m"]
-- uuidgen generates random uuid by default
| otherwise = []
(command:params) = words SysConfig.uuid
{- Get current repository's UUID. -}
getUUID :: Annex UUID

View file

@ -19,7 +19,7 @@ tests =
, testCp "cp_a" "-a"
, testCp "cp_p" "-p"
, testCp "cp_reflink_auto" "--reflink=auto"
, TestCase "uuid generator" $ selectCmd "uuid" ["uuid", "uuidgen"] ""
, TestCase "uuid generator" $ selectCmd "uuid" ["uuid -m", "uuid", "uuidgen"] ""
, TestCase "xargs -0" $ requireCmd "xargs_0" "xargs -0 </dev/null"
, TestCase "rsync" $ requireCmd "rsync" "rsync --version >/dev/null"
, TestCase "curl" $ testCmd "curl" "curl --version >/dev/null"

1
debian/changelog vendored
View file

@ -1,6 +1,7 @@
git-annex (3.20120925) UNRELEASED; urgency=low
* copy: Avoid updating the location log when no copy is performed.
* Test that uuid -m works, falling back to plain uuid if not.
-- Joey Hess <joeyh@debian.org> Mon, 24 Sep 2012 19:58:07 -0400