Generate a default TESTSDIR while still providing the ability to overwrite it
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 695 Build 695: arc lint + arc unit
Event Timeline
I disagree with this because it will break if bsd.test.mk is not in share/mk , and it's trying to resolve a bigger problem in the build system.
We need SRCTOP (and other relevant variables) added to FreeBSD (sjg@ has it in the bmake branch). It needs to be used here and elsewhere.
This is misplaced. TESTSDIR is defined in suite.test.mk, so the change has to be made there.
I don't object to having a sane default for TESTSDIR, though the syntax to make this happen in make hurts my eyes. Actually, I don't even understand what this is intending to compute, and a few local tests show results that don't make sense to me. Could you explain and update the change description accordingly? "Generate a default TESTSDIR" is not very descriptive...
| share/mk/suite.test.mk | ||
|---|---|---|
| 12–13 ↗ | (On Diff #2147) | One of these seems more natural to me:
|
OK, now I understand the value of the new setting.
| share/mk/suite.test.mk | ||
|---|---|---|
| 12–13 ↗ | (On Diff #2147) | Indeed. And make that a complete sentence: The default value of TESTSDIR is TESTSBASE plus the relative path to the directory containing the Makefile. |
| share/mk/suite.test.mk | ||
|---|---|---|
| 14 ↗ | (On Diff #2147) | This unfortunately won't work in all cases (I know because I ran into one of these cases recently at $work). Sometimes the path to suite.test.mk will be relative (e.g. when computed from share/mk), which will make TESTSDIR -> ${TESTSBASE}/. :(... Again, we need SRCTOP in order to determine this information properly... |
Default TESTSDIR to ${TESTSBASE}/${RELDIR:H}
The assumption is that the snippet is run out of the tests/ subdirectory
There are exceptions to the rule, hence the need for the override
Change has been committed, but closing this revision out by abandoning it because I don't have another option.