Show More
@@ -63,6 +63,8 b' parser.add_option("--tmpdir", type="stri' | |||
|
63 | 63 | help="run tests in the given temporary directory") |
|
64 | 64 | parser.add_option("-v", "--verbose", action="store_true", |
|
65 | 65 | help="output verbose messages") |
|
66 | parser.add_option("-n", "--nodiff", action="store_true", | |
|
67 | help="skip showing test changes") | |
|
66 | 68 | parser.add_option("--with-hg", type="string", |
|
67 | 69 | help="test existing install at given location") |
|
68 | 70 | |
@@ -71,6 +73,7 b' for option, default in defaults.items():' | |||
|
71 | 73 | parser.set_defaults(**defaults) |
|
72 | 74 | (options, args) = parser.parse_args() |
|
73 | 75 | verbose = options.verbose |
|
76 | nodiff = options.nodiff | |
|
74 | 77 | coverage = options.cover or options.cover_stdlib or options.annotate |
|
75 | 78 | python = sys.executable |
|
76 | 79 | |
@@ -308,6 +311,7 b' def run_one(test, skips, fails):' | |||
|
308 | 311 | |
|
309 | 312 | def fail(msg): |
|
310 | 313 | fails.append((test, msg)) |
|
314 | if not nodiff: | |
|
311 | 315 | print "\nERROR: %s %s" % (test, msg) |
|
312 | 316 | return None |
|
313 | 317 | |
@@ -374,6 +378,8 b' def run_one(test, skips, fails):' | |||
|
374 | 378 | if options.timeout > 0: |
|
375 | 379 | signal.alarm(0) |
|
376 | 380 | |
|
381 | mark = '.' | |
|
382 | ||
|
377 | 383 | skipped = (ret == SKIPPED_STATUS) |
|
378 | 384 | # If reference output file exists, check test output against it |
|
379 | 385 | if os.path.exists(ref): |
@@ -383,22 +389,26 b' def run_one(test, skips, fails):' | |||
|
383 | 389 | else: |
|
384 | 390 | ref_out = [] |
|
385 | 391 | if skipped: |
|
392 | mark = 's' | |
|
386 | 393 | missing = extract_missing_features(out) |
|
387 | 394 | if not missing: |
|
388 | 395 | missing = ['irrelevant'] |
|
389 | 396 | skip(missing[-1]) |
|
390 | 397 | elif out != ref_out: |
|
398 | mark = '!' | |
|
391 | 399 | if ret: |
|
392 | 400 | fail("output changed and returned error code %d" % ret) |
|
393 | 401 | else: |
|
394 | 402 | fail("output changed") |
|
403 | if not nodiff: | |
|
395 | 404 | show_diff(ref_out, out) |
|
396 | 405 | ret = 1 |
|
397 | 406 | elif ret: |
|
407 | mark = '!' | |
|
398 | 408 | fail("returned error code %d" % ret) |
|
399 | 409 | |
|
400 | 410 | if not verbose: |
|
401 |
sys.stdout.write( |
|
|
411 | sys.stdout.write(mark) | |
|
402 | 412 | sys.stdout.flush() |
|
403 | 413 | |
|
404 | 414 | if ret != 0 and not skipped: |
General Comments 0
You need to be logged in to leave comments.
Login now