Ah, interesting. I think I misunderstood the main point of your proposal -- your purpose isn't to standardize the names of directories which contain tests much as to move tests closer in the directory structure to the code they're testing.
Thanks for clarifying. > So let me give one example. > > I was looking at the following URL: > http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/ > > Why have those tests be placed into this location and not beside the > actual implementation code? It's hard when you work on tests (e.g. > fixing brokenness) and you have to check the implementation. It takes a > bit of time you have to spend on figuring out where the source actually > lives. I don't think this is as simple as you make it out to be. Even supposing we can identify a single directory which most of the code that a test is testing lives in and that we move the test there, when you look at a test and try to find the code it's testing, you still have to identify where in that directory the code under test actually lives, and that's non-trivial. I'd contend that in both the current and proposed schemes, the fastest way to find the code that's being tested is the same: Look at the bug number in the test name (or hg log to find it, if the test name doesn't have a bug number). Open that bug in bugzilla and you'll probably quickly find the code under test. I'm sure there's room for improvement in how we organize our tests, and if you think you have a better way of organizing specifically the DOM tests, I'd love to see it. But I'm not convinced that a full-on policy dictating that everyone must organize their tests as you outlined would be beneficial. I'd rather that you convince module owners to follow your lead by virtue of its being obviously better than the alternative. On Thu, Oct 25, 2012 at 11:49 AM, Henrik Skupin <hsku...@gmail.com> wrote: > Justin Lebar wrote on 10/25/12 10:06 AM: > >> I'd probably be a lot more sympathetic to this proposal if I >> understood in a concrete way how making my life a little harder here >> would make your life a little easier. What problem exactly are you >> trying to solve? > > Good points. So let me give one example. > > I was looking at the following URL: > http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/ > > Why have those tests be placed into this location and not beside the > actual implementation code? It's hard when you work on tests (e.g. > fixing brokenness) and you have to check the implementation. It takes a > bit of time you have to spend on figuring out where the source actually > lives. > >> I personally like the fact that we don't have the tests in >> dom/browser-element/tests/mochitest. The extra directory would have >> just one child, so from my perspective, it would add very little. (I >> have to type this path all the time.) I don't know how many other >> folders you'd need to change in a similar way. > > I don't think I have a problem with it. If there is only one single type > of test harness used, we could have the tests directly under a folder > with it's name. Once more are getting added we could consider to move > e.g. the mochitests to tests/mochitest/. > > -- > Henrik _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform