changeset 363:98f3a8568b0c

Tests: try to load python plugin if uwsgi has no wsgi option.
author Sergey Budnevitch <sb@waeme.net>
date Tue, 17 Dec 2013 00:07:40 +0400
parents 8ca9c75c97d2
children ec3284ebe53b
files uwsgi.t
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/uwsgi.t
+++ b/uwsgi.t
@@ -56,7 +56,15 @@ def application(env, start_response):
 
 END
 
-$t->run_daemon('uwsgi', '--socket', '127.0.0.1:8081',
+my $uwsgihelp = `uwsgi -h`;
+my @uwsgiopts = ();
+
+if ($uwsgihelp !~ /--wsgi-file/) {
+	# uwsgi has no python support, maybe plugin load is necessary
+	push @uwsgiopts, '--plugin', 'python';
+}
+
+$t->run_daemon('uwsgi', '--socket', '127.0.0.1:8081', @uwsgiopts,
 	'--wsgi-file', $t->testdir() . '/uwsgi_test_app.py',
 	'--logto', $t->testdir() . '/uwsgi_log');