Ticket #3708 (closed defect: fixed)
Usability problems with '--enable-tests' (configure.ac)
|Reported by:||mooffie||Owned by:||zaytsev|
|Branch state:||merged||Votes for changeset:||committed-master|
To enable tests, one has to pass --enable-tests to configure. But there are a few usability problems in this mechanism:
When the programmer doesn't pass --enable-tests:
In this case, the output on screen and the generated files falsely give the impression tests were enabled:
(1) The message "checking for CHECK..." appears.
(2) The makefiles under the 'tests' tree are generated, even though configure.ac has a conditional that's supposed to prevent this (i.e., if test x$enable_tests != xno).
When the programmer does pass --enable-tests:
(3) She doesn't have an easy way to know if tests were indeed successfully enabled. That's because error messages are very hard to spot, and because the test makefiles, because of (2), are created unconditionally and therefore can't serve as indicator.
(4) Instructions on how to enable the tests should appear where they're expected.
Are these usability problems grave?
Yes! People are wasting time trying to figure out these issues by themselves.
The attached patch fixes these problems:
- Problems (1) and (2) are caused by comparing $enable_tests with "no". But $enable_tests usually contains empty string in this case, not "no". We fix this.
- We solve problem (3) by adding some text to the final summary message.
- We solve problem (4) by adding a README file, in the place where it's expected.
- Status changed from new to accepted
- Owner set to zaytsev
- Branch state changed from no branch to on review
- Milestone changed from Future Releases to 4.8.19
Changed 3 months ago by mooffie
- Attachment 3708-Fix-usability-problems-in-enable-tests--v2.patch added
comment:12 follow-up: ↓ 13 Changed 4 weeks ago by mooffie
- Branch state changed from on review to on rework
Changed 4 weeks ago by mooffie
- Attachment 3708-Fix-usability-problems-in-enable-tests--v3.patch added
comment:18 Changed 4 weeks ago by andrew_b
- Votes for changeset set to andrew_b
- Branch state changed from on review to approved
comment:19 Changed 4 weeks ago by zaytsev
- Status changed from accepted to testing
- Votes for changeset changed from andrew_b to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged