Changes in / [cb7caf8:d4afaac]
- Location:
- src/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/pybin/tools.py
rcb7caf8 rd4afaac 83 83 return sh(cmd) 84 84 85 def which(program):86 import os87 def is_exe(fpath):88 return os.path.isfile(fpath) and os.access(fpath, os.X_OK)89 90 fpath, fname = os.path.split(program)91 if fpath:92 if is_exe(program):93 return program94 else:95 for path in os.environ["PATH"].split(os.pathsep):96 exe_file = os.path.join(path, program)97 if is_exe(exe_file):98 return exe_file99 100 return None101 85 ################################################################################ 102 86 # file handling … … 235 219 return False 236 220 237 def fancy_print(text):238 column = which('column')239 if column:240 cmd = "%s 2> /dev/null" % column241 print(cmd)242 proc = Popen(cmd, stdin=PIPE, stderr=None, shell=True)243 proc.communicate(input=text)244 else:245 print(text)246 221 247 222 settings.set_machine_default( getMachineType ) -
src/tests/test.py
rcb7caf8 rd4afaac 277 277 elif options.list : 278 278 print("Listing for %s:%s"% (settings.arch.string, settings.debug.string)) 279 fancy_print("\n".join(map(lambda t: "%s" % (t.toString()), tests)))279 print("\n".join(map(lambda t: "%s" % (t.toString()), tests))) 280 280 281 281 else :
Note: See TracChangeset
for help on using the changeset viewer.