~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/HACKING.txt

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-05-12 11:57:43 UTC
  • mfrom: (3426.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20080512115743-6uz3lnmrrbhmoiqe
(vila) Adding --starting-with <test_id> option to selftest makes it
        run faster on selective loading

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
down the track do not break new features or bug fixes that you are
251
251
contributing today.
252
252
 
253
 
As of May 2007, Bazaar ships with a test suite containing over 6000 tests
 
253
As of May 2008, Bazaar ships with a test suite containing over 12000 tests
254
254
and growing. We are proud of it and want to remain so. As community
255
255
members, we all benefit from it. Would you trust version control on
256
256
your project to a product *without* a test suite like Bazaar has?
283
283
This option can be combined with other selftest options (like -x) and
284
284
filter patterns to understand their effect.
285
285
 
 
286
Once you understand how to create a list of tests, you can use the --load-list
 
287
option to run only a restricted set of tests that you kept in a file, one test
 
288
id by line. Keep in mind that this will never be sufficient to validate your
 
289
modifications, you still need to run the full test suite for that, but using it
 
290
can help in some cases (like running only the failed tests for some time)::
 
291
 
 
292
  ./bzr selftest -- load-list my_failing_tests
 
293
 
 
294
This option can also be combined with other selftest options, including
 
295
patterns. It has some drawbacks though, the list can become out of date pretty
 
296
quick when doing Test Driven Development.
 
297
 
 
298
To address this concern, there is another way to run a restricted set of tests:
 
299
the --starting-with option will run only the tests whose name starts with the
 
300
specified string. It will also avoid loading the other tests and as a
 
301
consequence starts running your tests quicker::
 
302
 
 
303
  ./bzr selftest --starting-with bzrlib.blackbox
 
304
 
 
305
This option can be combined with all the other selftest options including
 
306
--load-list. The later is rarely used but allows to run a subset of a list of
 
307
failing tests for example.
286
308
 
287
309
Test suite debug flags
288
310
----------------------