[PATCH 06/17] filter-subunit: Consistently use spaces rather than tabs.
Jelmer Vernooij
jelmer at samba.org
Sat Nov 1 13:21:58 MDT 2014
Change-Id: I760399cb4bf0aa9753f5f1e842919b386e1caca9
Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
---
selftest/filter-subunit | 72 ++++++++++++++++++++++++-------------------------
1 file changed, 36 insertions(+), 36 deletions(-)
diff --git a/selftest/filter-subunit b/selftest/filter-subunit
index f0528f0..654ad9b 100755
--- a/selftest/filter-subunit
+++ b/selftest/filter-subunit
@@ -30,73 +30,73 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/extras"))
import subunithelper
parser = optparse.OptionParser("filter-subunit [options] < instream > outstream")
-parser.add_option("--expected-failures", type="string",
- help="File containing list of regexes matching tests to consider known "
- "failures")
+parser.add_option("--expected-failures", type="string",
+ help="File containing list of regexes matching tests to consider known "
+ "failures")
parser.add_option("--flapping", type="string",
- help="File containing list of flapping tests, of which to ignore results.")
+ help="File containing list of flapping tests, of which to ignore results.")
parser.add_option("--strip-passed-output", action="store_true",
help="Whether to strip output from tests that passed")
parser.add_option("--fail-immediately", action="store_true",
help="Whether to stop on the first error", default=False)
parser.add_option("--prefix", type="string",
- help="Add prefix to all test names")
+ help="Add prefix to all test names")
parser.add_option("--suffix", type="string",
- help="Add suffix to all test names")
+ help="Add suffix to all test names")
parser.add_option("--fail-on-empty", default=False,
- action="store_true", help="Fail if there was no subunit output")
+ action="store_true", help="Fail if there was no subunit output")
parser.add_option("--list", default=False,
- action="store_true", help="Operate in list mode")
+ action="store_true", help="Operate in list mode")
opts, args = parser.parse_args()
if opts.list:
- prefix = opts.prefix
- suffix = opts.suffix
- if not prefix:
- prefix = ""
- if not suffix:
- suffix = ""
- for l in sys.stdin:
- sys.stdout.write("%s%s%s\n" % (prefix, l.rstrip(), suffix))
- sys.exit(0)
+ prefix = opts.prefix
+ suffix = opts.suffix
+ if not prefix:
+ prefix = ""
+ if not suffix:
+ suffix = ""
+ for l in sys.stdin:
+ sys.stdout.write("%s%s%s\n" % (prefix, l.rstrip(), suffix))
+ sys.exit(0)
if opts.expected_failures:
- expected_failures = subunithelper.read_test_regexes(opts.expected_failures)
+ expected_failures = subunithelper.read_test_regexes(opts.expected_failures)
else:
- expected_failures = {}
+ expected_failures = {}
if opts.flapping:
- flapping = subunithelper.read_test_regexes(opts.flapping)
+ flapping = subunithelper.read_test_regexes(opts.flapping)
else:
- flapping = {}
+ flapping = {}
statistics = {
- 'TESTS_UNEXPECTED_OK': 0,
- 'TESTS_EXPECTED_OK': 0,
- 'TESTS_UNEXPECTED_FAIL': 0,
- 'TESTS_EXPECTED_FAIL': 0,
- 'TESTS_ERROR': 0,
- 'TESTS_SKIP': 0,
+ 'TESTS_UNEXPECTED_OK': 0,
+ 'TESTS_EXPECTED_OK': 0,
+ 'TESTS_UNEXPECTED_FAIL': 0,
+ 'TESTS_EXPECTED_FAIL': 0,
+ 'TESTS_ERROR': 0,
+ 'TESTS_SKIP': 0,
}
def handle_sigint(sig, stack):
- sys.exit(0)
+ sys.exit(0)
signal.signal(signal.SIGINT, handle_sigint)
out = subunithelper.SubunitOps(sys.stdout)
msg_ops = subunithelper.FilterOps(out, opts.prefix, opts.suffix, expected_failures,
- opts.strip_passed_output,
- fail_immediately=opts.fail_immediately,
- flapping=flapping)
+ opts.strip_passed_output,
+ fail_immediately=opts.fail_immediately,
+ flapping=flapping)
try:
- ret = subunithelper.parse_results(msg_ops, statistics, sys.stdin)
+ ret = subunithelper.parse_results(msg_ops, statistics, sys.stdin)
except subunithelper.ImmediateFail:
- sys.stdout.flush()
- sys.exit(1)
+ sys.stdout.flush()
+ sys.exit(1)
if opts.fail_on_empty and not msg_ops.seen_output:
- sys.exit(1)
+ sys.exit(1)
else:
- sys.exit(ret)
+ sys.exit(ret)
--
2.1.1
More information about the samba-technical
mailing list