add DATAROOTDIR to build_h.jl, use it in Base.runtests()

fixes #8368 @nalimilan
If there is a time to break things in order to get it to work right, it's
now.
On Sep 16, 2014 8:45 PM, "Tony Kelman" <notifications@github.com> wrote:

> In base/interactiveutil.jl:
>
> > @@ -372,9 +372,13 @@ function runtests(tests = ["all"], numcores = iceil(CPU_CORES/2))
> >      end
> >      ENV2 = copy(ENV)
> >      ENV2["JULIA_CPU_CORES"] = "$numcores"
> > +    runtestsjl = joinpath(Base.DATAROOTDIR, "julia", "test", "runtests.jl")
> > +    if isempty(Base.DATAROOTDIR) || !isfile(runtestsjl)
>
> Was more hesitant to mess around with prefix or SYSCONFDIR, that seems
> more likely to potentially break things. Who knows what's relying on the
> current behavior...
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/JuliaLang/julia/pull/8379/files#r17644511>.
>