Skip to content

Commit

Permalink
pulled some prints
Browse files Browse the repository at this point in the history
  • Loading branch information
skoczen committed Nov 19, 2011
1 parent 6c15f57 commit 221e87b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 2 additions & 8 deletions functional_tests/management/commands/selenium_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def setup_selenium_stack(worker_index, verbosity, options):
test_settings = "sel_worker_%s" % worker_index

test_server_settings = "--settings=%s" % test_settings
print test_server_settings


lots_of_options_dict = {
Expand All @@ -69,8 +68,7 @@ def setup_selenium_stack(worker_index, verbosity, options):
gun_command = "%(ve_path)s/bin/python manage.py run_gunicorn -w 2 -b 0.0.0.0:%(http_port)s %(test_server_settings)s" % lots_of_options_dict
cel_command = "%(ve_path)s/bin/python manage.py celeryd %(test_server_settings)s" % lots_of_options_dict
file_uploader_command = "%(ve_path)s/bin/python -m SimpleHTTPServer %(file_uploader_port)s" % lots_of_options_dict
print gun_command


subprocesses = []
# subprocesses.append(subprocess.Popen(sync_command, shell=True, **outputs ))
subprocesses.append(subprocess.Popen(sel_command, shell=True, **outputs ))
Expand Down Expand Up @@ -101,11 +99,9 @@ def teardown_selenium_stack(worker_index, subprocesses, silent_output):
except:
pass
try:
print '%s/sel_worker_%s.py' % (manage_folder, worker_index)
os.remove('%s/sel_worker_%s.py' % (manage_folder, worker_index))
os.remove('%s/sel_worker_%s.pyc' % (manage_folder, worker_index))
except Exception, e:
print e
pass

print "Stopping..."
Expand Down Expand Up @@ -199,7 +195,6 @@ def handle(self, *args, **options):
subprocess_stacks = []
output_files = []
results = []
print "Starting stacks..."
for base_port in range(0,num_processes):
results.append(self._pool.apply_async(setup_selenium_stack, [base_port, verbosity, options]))

Expand All @@ -221,5 +216,4 @@ def handle(self, *args, **options):
self._pool.apply_async(teardown_selenium_stack, [base_port, subprocess_stacks[base_port], output_files[base_port]])

self._pool.close()
self._pool.join()
print "Stacks closed."
self._pool.join()
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ from {{test_runner_settings}} import *
{% else %}
from settings import *
{% endif %}
print locals()

SELENIUM_TESTING = True
if 'test_' not in DATABASES['default']['NAME']:
Expand Down

0 comments on commit 221e87b

Please sign in to comment.