[bind10-dev] unit tests and include symlink tree

Shane Kerr shane at isc.org
Mon Feb 15 12:14:36 UTC 2010


Jelte & all,

On Mon, 2010-02-08 at 15:12 +0100, Jelte Jansen wrote:
> Jeremy C. Reed wrote:
> > 
> > I was going to remove include from the lcov report, but then realize it 
> > was inconsistent and the results would be wrong. I suggest we don't use 
> > the include symlink tree for the gtest tests.
> > 
> 
> just had a little chat on this on the room, but this might warrant a broader
> discussion;
> 
> the 'simple' fix as proposed by Jeremy would move the cpp source files one
> directory deeper; move src/lib/cc/cpp/* into src/lib/cc/cpp/cc/,
> src/lib/config/cpp/* into src/lib/config/cpp/config/ etc.
> 
> Then we can use direct -I in make again and the include symlink tree shouldn't
> be necessary for c++ anymore.
> 
> It is also equivalent to what we do in the python part; modules live under
> src/lib/<module>/python/isc/<module>/
> 
> But i'm starting to wonder whether this whole setup is costing use more in terms
> of inconvenience than it is worth for keeping code together for modules; if we
> would lay it out as one source tree per language it would make so much things
> cleaner (i.e. src/lib/cpp/<module> and src/lib/python/<module>). Then we also
> wouldn't need the pyshared/ hack. And less path settings for build and
> run-from-source.


I am agnostic whether we should have:

src/cc/<module>

OR:

src/<module>/cc

I'm not sure what the pyshared hack is. :)


I like simple, and I dislike having to go up and down 2 or 3 directories
to get to source files.

One problem is that if we use:

#include <isc/foo>

That there has to be a directory *somewhere* named "isc".

What I actually want is:

$ cd $SOME_DIRECTORY
$ ls
Makefile.am
README
a_file.cc
a_file.h
some_file.cc
some_file.h
  .
  .
  .
test/
$

Perhaps we can solve this as simply as doing:

$ cd $SOME_DIRECTORY
$ ls
  .
  .
  .
dns -> .
  .
  .
  .

So, in this case we are looking for <dns/a_file> and it works whether we
are looking in the installed location or in the source location. Then we
could do away with needing a symlink directory and use lots of -I to
make C++ work.


--
Shane




More information about the bind10-dev mailing list