simple support for disabling tests

This commit is contained in:
Denis Bilenko
2008-12-05 01:56:54 +06:00
parent e1f4792a2f
commit 30b70174e5
2 changed files with 10 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ import sys
import os
import sqlite3
import warnings
from greentest.test_support import disabled_marker
warnings.simplefilter('ignore')
@@ -38,7 +39,11 @@ def main():
print arg, 'finished with code', returncode
stdout = file(output_name).read()
if not debug:
if returncode!=1:
if returncode==1:
pass
elif returncode==8 and disabled_marker in stdout:
pass
else:
record(changeset, argv, stdout, returncode)
os.unlink(output_name)
sys.exit(returncode)

View File

@@ -5,6 +5,10 @@ if __name__ != 'greentest.test_support':
import sys
disabled_marker = '-*-*-*-*-*- disabled -*-*-*-*-*-'
def exit_disabled():
sys.exit(disabled_marker)
class Error(Exception):
"""Base class for regression test exceptions."""