diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2012-04-09 19:54:28 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2012-04-09 19:54:28 -0700 |
commit | 12b72dea2ba1256a1d74f28cb68e3af196dc7a76 (patch) | |
tree | db35c3315e91dffa3a2a4a66968ee9bb5c8d1f83 /framework | |
parent | b235d0632b16995619da7655d10c73691fbdd13b (diff) |
framework/threading: remove extra cruft (from program.py)
Diffstat (limited to 'framework')
-rwxr-xr-x | framework/threading.py | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/framework/threading.py b/framework/threading.py index 29e55a0..340fb8e 100755 --- a/framework/threading.py +++ b/framework/threading.py @@ -76,31 +76,3 @@ def processQueue(items, process, num_threads=0): print("Waiting for threads to quiesce...") while threading.activeCount() > 1: pass - -def runProgram(cmd): - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) - timeoutExpired = [] - def timerCallback(): - timeoutExpired.append(True) - proc.kill() - t = Timer(3.5, timerCallback) #### XXX: USE CONFIGURABLE TIMEOUT. - t.start() - - out, err = proc.communicate() - t.cancel() - - return (out, err, timeoutExpired) - - -def process(item): - out, err, timedOut = runProgram(item) - if timedOut: - print("expired") - else: - print("success", err) - -def main(): - processAsynchronously([['/home/kwg/Projects/piglit/bin/glsl-max-varyings', '-auto'] for i in range(3)], process) - -if __name__ == "__main__": - main() |