zdtm.py: fix checkskip logic

Fix checkskip logic, also emit a clearer reason when checkskip fails as to
why the test was skipped.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Tycho Andersen 2016-02-08 08:57:41 -07:00 committed by Pavel Emelyanov
parent 5219c5a3b8
commit 36aedc3b11

View file

@ -1078,7 +1078,7 @@ def self_checkskip(tname):
chs = tname + '.checkskip'
if os.access(chs, os.X_OK):
ch = subprocess.Popen([chs])
return ch.wait() == 0 and False or True
return not ch.wait() == 0
return False
@ -1159,7 +1159,7 @@ def run_tests(opts):
continue
if self_checkskip(t):
l.skip(t, "self")
l.skip(t, "checkskip failed")
continue
if opts['user']: