# HG changeset patch # User Sergey Budnevitch # Date 1387224460 -14400 # Node ID 98f3a8568b0c3e359514e62655fb6e6987876417 # Parent 8ca9c75c97d2d24bb9ede5ceaae33ff2b7a76147 Tests: try to load python plugin if uwsgi has no wsgi option. diff --git a/uwsgi.t b/uwsgi.t --- 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');