Test that uuid -m works, falling back to plain uuid if not.
This commit is contained in:
		
					parent
					
						
							
								bbe1f86325
							
						
					
				
			
			
				commit
				
					
						bc83179a76
					
				
			
		
					 3 changed files with 3 additions and 7 deletions
				
			
		| 
						 | 
					@ -36,12 +36,7 @@ genUUID = gen . lines <$> readProcess command params
 | 
				
			||||||
	where
 | 
						where
 | 
				
			||||||
		gen [] = error $ "no output from " ++ command
 | 
							gen [] = error $ "no output from " ++ command
 | 
				
			||||||
		gen (l:_) = toUUID l
 | 
							gen (l:_) = toUUID l
 | 
				
			||||||
		command = SysConfig.uuid
 | 
							(command:params) = words SysConfig.uuid
 | 
				
			||||||
		params
 | 
					 | 
				
			||||||
			-- request a random uuid be generated
 | 
					 | 
				
			||||||
			| command == "uuid" = ["-m"]
 | 
					 | 
				
			||||||
			-- uuidgen generates random uuid by default
 | 
					 | 
				
			||||||
			| otherwise = []
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
{- Get current repository's UUID. -}
 | 
					{- Get current repository's UUID. -}
 | 
				
			||||||
getUUID :: Annex UUID
 | 
					getUUID :: Annex UUID
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,7 +19,7 @@ tests =
 | 
				
			||||||
	, testCp "cp_a" "-a"
 | 
						, testCp "cp_a" "-a"
 | 
				
			||||||
	, testCp "cp_p" "-p"
 | 
						, testCp "cp_p" "-p"
 | 
				
			||||||
	, testCp "cp_reflink_auto" "--reflink=auto"
 | 
						, 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 "xargs -0" $ requireCmd "xargs_0" "xargs -0 </dev/null"
 | 
				
			||||||
	, TestCase "rsync" $ requireCmd "rsync" "rsync --version >/dev/null"
 | 
						, TestCase "rsync" $ requireCmd "rsync" "rsync --version >/dev/null"
 | 
				
			||||||
	, TestCase "curl" $ testCmd "curl" "curl --version >/dev/null"
 | 
						, TestCase "curl" $ testCmd "curl" "curl --version >/dev/null"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										1
									
								
								debian/changelog
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								debian/changelog
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -1,6 +1,7 @@
 | 
				
			||||||
git-annex (3.20120925) UNRELEASED; urgency=low
 | 
					git-annex (3.20120925) UNRELEASED; urgency=low
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  * copy: Avoid updating the location log when no copy is performed.
 | 
					  * 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
 | 
					 -- Joey Hess <joeyh@debian.org>  Mon, 24 Sep 2012 19:58:07 -0400
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue