summaryrefslogtreecommitdiffhomepage
path: root/tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'tasks.py')
-rw-r--r--tasks.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/tasks.py b/tasks.py
index 42c18bd0..4ddeeee3 100644
--- a/tasks.py
+++ b/tasks.py
@@ -1,9 +1,11 @@
+import os
from os.path import join
from shutil import rmtree, copytree
from invoke import Collection, task
from invocations.docs import docs, www, sites
from invocations.packaging.release import ns as release_coll, publish
+from invocations.testing import count_errors
# Until we move to spec-based testing
@@ -14,7 +16,13 @@ def test(ctx, coverage=False, flags=""):
runner = "python"
if coverage:
runner = "coverage run --source=paramiko"
- ctx.run("{0} test.py {1}".format(runner, flags), pty=True)
+ # Strip SSH_AUTH_SOCK from parent env to avoid pollution by interactive
+ # users.
+ env = dict(os.environ)
+ if 'SSH_AUTH_SOCK' in env:
+ del env['SSH_AUTH_SOCK']
+ cmd = "{0} test.py {1}".format(runner, flags)
+ ctx.run(cmd, pty=True, env=env, replace_env=True)
@task
@@ -49,7 +57,7 @@ def release(ctx, sdist=True, wheel=True, sign=True, dry_run=False):
# aliasing, defaults etc.
release_coll.tasks['publish'] = release
-ns = Collection(test, coverage, release_coll, docs, www, sites)
+ns = Collection(test, coverage, release_coll, docs, www, sites, count_errors)
ns.configure({
'packaging': {
# NOTE: many of these are also set in kwarg defaults above; but having