Skip to content

Commit

Permalink
[Truffle] Remove unused code in mx_jruby.
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Nov 7, 2016
1 parent 4fd96c7 commit e809c8c
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions mx.jruby/mx_jruby.py
Expand Up @@ -279,36 +279,3 @@ def ruby_tck(args):
'rubytck': [ruby_tck, ''],
'deploy-binary-if-truffle-head': [deploy_binary_if_truffle_head, ''],
})

# Utilities

def jt(args, suite=None, nonZeroIsFatal=True, out=None, err=None, timeout=None, env=None, cwd=None):
rubyDir = _suite.dir
jt = join(rubyDir, 'tool', 'jt.rb')
return mx.run(['ruby', jt] + args, nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, timeout=timeout, env=env, cwd=cwd)

FNULL = open(os.devnull, 'w')

class BackgroundServerTask:
def __init__(self, args):
self.args = args

def __enter__(self):
preexec_fn, creationflags = mx._get_new_progress_group_args()
if mx._opts.verbose:
mx.log(' '.join(['(background)'] + map(pipes.quote, self.args)))
self.process = subprocess.Popen(self.args, preexec_fn=preexec_fn, creationflags=creationflags, stdout=FNULL, stderr=FNULL)
mx._addSubprocess(self.process, self.args)

def __exit__(self, type, value, traceback):
self.process.kill()
self.process.wait()

def is_running(self):
return self.process.poll() is None

class BackgroundJT(BackgroundServerTask):
def __init__(self, args):
rubyDir = _suite.dir
jt = join(rubyDir, 'tool', 'jt.rb')
BackgroundServerTask.__init__(self, ['ruby', jt] + args)

0 comments on commit e809c8c

Please sign in to comment.