def check_for_graphviz(args): if args.graph: try: run_cmd('which dot') return True except CommandError: pass return False
def build(self): data = { 'project_path': os.path.dirname(mkfile.__file__), } data['data_path'] = os.path.join(data['project_path'], 'data') data['supervisor_path'] = os.path.join(data['data_path'], 'supervisor') data['output_file'] = os.path.join(data['project_path'], self.output_file) try: os.mkdir(data['supervisor_path']) except OSError: pass mktemplate('supervisor.conf.jinja2', self.output_file, data) try: run_cmd('supervisorctl -c %(output_file)s reread' % data, True) except CommandError: logger.warning('WARNING: Supervisord not yet started !!! Starting...') run_cmd('supervisord -c %(output_file)s' % data)
def build(self): try: run_cmd('supervisorctl -c %s avail' % supervision.output_file) except CommandError: logger.warning('WARNING: Supervisord not yet started !!! Starting...') run_cmd('supervisord -c %s' % (supervision.output_file)) run_cmd('supervisorctl -c %s' % (supervision.output_file,), True)
def test_providing_string(self): ret = extra.run_cmd('ls', '*.py') self.assertEqual(None, ret[0]) self.assertEqual(None, ret[1])
def test_show_output(self): ret = extra.run_cmd(['ls', '*.py'], show_output=True) self.assertEqual(None, ret[0]) self.assertEqual(None, ret[1])
def test_success(self): ret = extra.run_cmd(['ls -al']) self.assertEqual(file, type(ret[0])) self.assertEqual(file, type(ret[1]))
def build(self): run_cmd(['./bin/buildout'], True) touch('./bin/py')
def build(self): run_cmd(['wget ' + self.url], True) run_cmd(['python2 bootstrap.py'], True)
def build(self): run_cmd('uwsgi --ini-paste %s' % (frontendini.output_file), True)
def build(self): run_cmd(['./bin/tests'], True)
def build(self): run_cmd('./bin/pserve --reload %s' % (frontendini.output_file), True)
def build(self): run_cmd('supervisorctl -c %s restart skysoccer' % (supervision.output_file,), True)