from __future__ import absolute_import
+import inspect
import os
+import sys
import lit.Test
import lit.TestFormats
def getBashPath(self):
"""getBashPath - Get the path to 'bash'"""
- import os
-
if self.bashPath is not None:
return self.bashPath
return dir
def _write_message(self, kind, message):
- import inspect, os, sys
-
# Get the file/line where this message was generated.
f = inspect.currentframe()
# Step out of _write_message, and then out of wrapper.
self.numErrors += 1
def fatal(self, message):
- import sys
self._write_message('fatal', message)
sys.exit(2)
self.cleared = 1
def test():
- import time
tc = TerminalController()
p = ProgressBar(tc, 'Tests')
for i in range(101):
-import os, sys
+import errno
+import itertools
+import math
+import os
+import subprocess
+import sys
def detectCPUs():
"""
def mkdir_p(path):
"""mkdir_p(path) - Make the "path" directory, if it does not exist; this
will also make directories for any missing parent directories."""
- import errno
-
if not path or os.path.exists(path):
return
raise
def capture(args, env=None):
- import subprocess
"""capture(command) - Run the given command (or argv list) in a shell and
return the standard output."""
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
return None
def printHistogram(items, title = 'Items'):
- import itertools, math
-
items.sort(key = lambda item: item[1])
maxValue = max([v for _,v in items])
# blocking operation (hopefully exec) than to try and unblock other threads.
#
# FIXME: This is a hack.
- import sys
sys.setcheckinterval(1000)
global options