Skip to content

Commit bffeba1

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

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/magtests.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,8 +800,10 @@ 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+
errs = -1
804+
804805
try:
806+
# prepare environment for tests
805807
wrapenv = apply_venv(setup_wrappers(testdir))
806808

807809
kdcproc, kdcenv = setup_kdc(testdir, wrapenv)
@@ -815,6 +817,9 @@ def test_mech_name(testdir, testenv, logfile):
815817

816818
testenv['DELEGCCACHE'] = os.path.join(testdir, 'httpd',
817819
USR_NAME + '@' + TESTREALM)
820+
errs = 0
821+
822+
# making testing
818823
errs += test_spnego_auth(testdir, testenv, logfile)
819824

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

0 commit comments

Comments
 (0)