Skip to content

Commit fcf9d4d

Browse files
stanislavlevinsimo5
authored andcommitted
tests: Catch errors during tests setup
Fixes: #224 Signed-off-by: Stanislav Levin <slev@altlinux.org>
1 parent 75ac8df commit fcf9d4d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/magtests.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,8 +800,11 @@ def test_mech_name(testdir, testenv, logfile):
800800

801801
processes = dict()
802802
logfile = open(os.path.join(testdir, 'tests.log'), 'w')
803-
errs = 0
803+
# '-1' indicates setup phase
804+
errs = -1
805+
804806
try:
807+
# prepare environment for tests
805808
wrapenv = apply_venv(setup_wrappers(testdir))
806809

807810
kdcproc, kdcenv = setup_kdc(testdir, wrapenv)
@@ -815,6 +818,9 @@ def test_mech_name(testdir, testenv, logfile):
815818

816819
testenv['DELEGCCACHE'] = os.path.join(testdir, 'httpd',
817820
USR_NAME + '@' + TESTREALM)
821+
# making testing
822+
errs = 0
823+
818824
errs += test_spnego_auth(testdir, testenv, logfile)
819825

820826
testenv['MAG_GSS_NAME'] = USR_NAME + '@' + TESTREALM

0 commit comments

Comments
 (0)