D John Anderson wrote: > I'm really glad Grant noticed this. Running tests without asserts is > almost like not running tests at all. Perhaps we need a test that > complains when we run non-performance tests with -O so we don't make > this mistake again.
We've always (apart from bugs) run release mode tests with -O and debug mode tests without. Tests should not rely on assert, and AFAIK they don't. If you see any assert calls in any unit, functional or performance test it is a bug. The unit test framework provides assertions that work even with -O (assert* methods on classes that derive from unittest), and func and perf tests rely on CATS or ad hoc tests. There are asserts and __debug__ only code in Chandler itself, though. Now this obviously presents some problems. Tinderbox runs both release and debug, so it covers everything. Many developers run just one mode, so they will miss some parts that Tinderbox will be testing. I don't think it would a good idea to generally run tests in some mode that the end user will not run. However, if recorded tests never fail when run with -O we need to do something about that. Ideally they would work just the same with -O, but if that is not possible due to perf issues, for example, then perhaps we should modify rt such that if you run only release mode, we take out -O when running recorded tests. -- Heikki Toivonen
signature.asc
Description: OpenPGP digital signature
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Open Source Applications Foundation "chandler-dev" mailing list http://lists.osafoundation.org/mailman/listinfo/chandler-dev
