preserve args' whitespace layout in benchmark summary
This commit is contained in:
		
							parent
							
								
									77a543e7b7
								
							
						
					
					
						commit
						2092ed85ae
					
				@ -80,13 +80,14 @@ main = do
 | 
			
		||||
--       parseargs (t:n:d:[]) = parseargs (t:n:d:["darcs"])
 | 
			
		||||
      parseargs (t:n:es) = (t,read n,".",es)
 | 
			
		||||
      parseargs _ = error $ "\n" ++ usage
 | 
			
		||||
      testlines s = filter istest $ map clean $ lines s
 | 
			
		||||
      istest s = not (null s || ("#" `isPrefixOf` s))
 | 
			
		||||
      testlines s = filter istest $ lines s
 | 
			
		||||
      istest s = not (null s' || ("#" `isPrefixOf` s')) where s' = clean s
 | 
			
		||||
 | 
			
		||||
clean = unwords . words
 | 
			
		||||
 | 
			
		||||
doiteration :: String -> String -> String -> Int -> IO Float
 | 
			
		||||
doiteration test exe dir iteration = do
 | 
			
		||||
  let cmd = unwords [exe,test]
 | 
			
		||||
  let cmd = unwords [exe,clean test]
 | 
			
		||||
  putStr $ show iteration ++ ": " ++ cmd
 | 
			
		||||
  hFlush stdout
 | 
			
		||||
  t <- time cmd
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user