comparison tests/hghave @ 5162:9b0efeb725f4

test-profile: fix grep, check hotshot availability
author Patrick Mezard <pmezard@gmail.com>
date Tue, 14 Aug 2007 18:53:45 +0200
parents 105d4cf7ec24
children e5b21a549cc5
comparison
equal deleted inserted replaced
5161:24d306834de5 5162:9b0efeb725f4
33 os.remove(path) 33 os.remove(path)
34 return True 34 return True
35 except: 35 except:
36 return False 36 return False
37 37
38 def has_hotshot():
39 try:
40 import hotshot
41 return True
42 except ImportError:
43 return False
44
38 def has_lsprof(): 45 def has_lsprof():
39 try: 46 try:
40 import _lsprof 47 import _lsprof
41 return True 48 return True
42 except ImportError: 49 except ImportError:
44 51
45 checks = { 52 checks = {
46 "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"), 53 "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
47 "execbit": (has_executablebit, "executable bit"), 54 "execbit": (has_executablebit, "executable bit"),
48 "fifo": (has_fifo, "named pipes"), 55 "fifo": (has_fifo, "named pipes"),
56 "hotshot": (has_hotshot, "python hotshot module"),
49 "lsprof": (has_lsprof, "python lsprof module"), 57 "lsprof": (has_lsprof, "python lsprof module"),
50 "symlink": (has_symlink, "symbolic links"), 58 "symlink": (has_symlink, "symbolic links"),
51 } 59 }
52 60
53 def list_features(): 61 def list_features():