Skip to content

Commit b5b41c8

Browse files
Support virtualenv in test suite
Signed-off-by: Robbie Harwood <[email protected]> Reviewed-by: Simo Sorce <[email protected]>
1 parent 07b0d3c commit b5b41c8

14 files changed

+18
-15
lines changed

tests/magtests.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import argparse
@@ -395,7 +395,6 @@ def setup_keys(tesdir, env):
395395

396396

397397
def setup_http(testdir, so_dir, wrapenv):
398-
399398
httpdir = os.path.join(testdir, 'httpd')
400399
if os.path.exists(httpdir):
401400
shutil.rmtree(httpdir)
@@ -706,6 +705,10 @@ def test_hostname_acceptor(testdir, testenv, testlog):
706705
keysenv = setup_keys(testdir, kdcenv)
707706
testenv = kinit_user(testdir, kdcenv)
708707

708+
# support virtualenv
709+
testenv['PATH'] = os.environ.get('PATH', '')
710+
testenv['ViRTUAL_ENV'] = os.environ.get('VIRTUAL_ENV', '')
711+
709712
testenv['DELEGCCACHE'] = os.path.join(testdir, 'httpd',
710713
USR_NAME + '@' + TESTREALM)
711714
test_spnego_auth(testdir, testenv, testlog)

tests/t_bad_acceptor_name.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

tests/t_basic_k5.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

tests/t_basic_k5_fail_second.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

tests/t_basic_k5_two_users.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

tests/t_basic_proxy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

tests/t_hostname_acceptor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2017 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

tests/t_nonego.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

tests/t_required_name_attr.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

tests/t_spnego.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

tests/t_spnego_negotiate_once.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

tests/t_spnego_no_auth.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

tests/t_spnego_proxy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

tests/t_spnego_rewrite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
33

44
import os

0 commit comments

Comments
 (0)