summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2014-09-18 15:18:51 -0700
committerJeff Forcier <jeff@bitprophet.org>2014-09-18 15:18:51 -0700
commita146374936f5eb8f4736af3f7297117cdf5d291b (patch)
treea28a20cd13183bd66114c4538fd23f9785440d87
parentf74c7d76ec2ea9d39a4af6643761b648f81bd266 (diff)
downloadparamiko-a146374936f5eb8f4736af3f7297117cdf5d291b.tar.gz
Add ability to run Kerberos tests to the test runner.
Includes merging coverage task into test task
-rw-r--r--.travis.yml3
-rw-r--r--kerberos-requirements.txt2
-rw-r--r--tasks.py16
3 files changed, 13 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index 3f6f7331..604b6fd2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,9 +11,10 @@ install:
# Dev (doc/test running) requirements
- pip install coveralls # For coveralls.io specifically
- pip install -r dev-requirements.txt
+ - pip install -r kerberos-requirements.txt # for GSSAPI tests
script:
# Main tests, with coverage!
- - invoke coverage
+ - inv test --coverage --kerberos
# Ensure documentation & invoke pipeline run OK.
# Run 'docs' first since its objects.inv is referred to by 'www'.
# Also force warnings to be errors since most of them tend to be actual
diff --git a/kerberos-requirements.txt b/kerberos-requirements.txt
new file mode 100644
index 00000000..0e8c156a
--- /dev/null
+++ b/kerberos-requirements.txt
@@ -0,0 +1,2 @@
+pyasn1>=0.1.7
+python-gssapi>=0.6.1
diff --git a/tasks.py b/tasks.py
index cf43a5fd..68912ce0 100644
--- a/tasks.py
+++ b/tasks.py
@@ -27,12 +27,14 @@ www = Collection.from_module(_docs, name='www', config={
# Until we move to spec-based testing
@task
-def test(ctx):
- ctx.run("python test.py --verbose", pty=True)
-
-@task
-def coverage(ctx):
- ctx.run("coverage run --source=paramiko test.py --verbose")
+def test(ctx, kerberos=False, coverage=False):
+ runner = "python"
+ if coverage:
+ runner = "coverage run --source=paramiko"
+ flags = "--verbose"
+ if kerberos:
+ flags += " --gssapi-test --test-gssauth --test-gssapi-keyex"
+ ctx.run("{0} test.py {1}".format(runner, flags), pty=True)
# Until we stop bundling docs w/ releases. Need to discover use cases first.
@@ -48,4 +50,4 @@ def release(ctx):
publish(ctx, wheel=True)
-ns = Collection(test, coverage, release, docs=docs, www=www)
+ns = Collection(test, release, docs=docs, www=www)