I'm unable to reproduce this. We're supposed to ignore the the test directories when scanning moz.build files as part of building the docs. Do you have any symlinks or uppercase letters in your srcdir/objdir paths? Does a clobber fix things?
No, but I do have my objdir live outside my srcdir which I guess is unusual: mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../builds/obj-ff-64gdb My structure is: mozilla-central - tree - builds/obj-ff-64gdb (based off .mozconfig64gdb) - builds/obj-ff-64opt (based off .mozconfig64opt) Perhaps that's the problem?
Ohh interesting. Looks like I somehow accumulated a nested mozilla-central checkout inside my main mozilla tree at a few years back and never noticed. Looks like this is one of the few commands to be sensitive to that. IMO this is still a bug but probably less important.
It's not a bug: it's how moz.build reading works in filesystem traversal mode. We simply walk the filesystem looking for moz.build files. Yes, we could integrate with VCS to grab the files list or we could ignore subrepos (.hg or .git dirs). But since you are the first person to hit this, I'm going to say this is well below our threshold for problems to deal with.