[cfe-dev] windows testing - lit.py failure

dawn at burble.org dawn at burble.org
Tue Mar 15 18:04:29 PDT 2011


On Wed, Mar 16, 2011 at 01:51:20AM +0100, Óscar Fuentes wrote:
> dawn at burble.org writes:
> 
> >> >> Are you trying to test an installed Clang or LLVM? (that's not
> >> >> supported) Is the python interpreter found when you configure your build
> >> >> directory with cmake?
> >> >
> >> > No, it's a clang I built using cmake and nmake.
> >> 
> >> Sure, but did you installed the resulting binaries with execute `nmake
> >> install' ?
> >
> > Oops.  No, I didn't know I needed to do that.  I just did...
> > but it made no difference - the nmake and cmake commands you gave me both fail
> > in lit.cfg.
> 
> No, you don't need to that. Actualy, as explained above, running tests
> on the installed files of LLVM/Clang is not supported. Tests must be run
> from the build directory (as you are doing)
> 
> >> >> Those c:/llvmpath and c:/clangpath on your command looks suspicious to
> >> >> me.
> >> >
> >> > What's wrong with that?  It comes stright from the online instructions.
> >> 
> >> The Clang sources are supposed to live within the LLVM source tree
> >> (under tools/clang) not outside the LLVM source directory, unless you
> >> are using the recently added feature for building Clang as an
> >> independent project.
> >
> > clang lives in llvm/tools as usual.
> 
> So what's c:/llvmpath and c:/clangpath ?

llvmpath = c:\dev\llvm
clangpath = c:\dev\llvm\tools\clang

> 
> >> Can you show the exact sequence of commands you executed from the
> >> LLVM&Clang source code checkout until the failed attempt at testing
> >> (both inclusive)?
> >
> > cd c:\dev
> > svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
> > cd llvm\tools
> > svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
> >
> > cd c:\dev
> > mkdir build
> > cd build
> >
> > cmd /c msvcenv.cmd 
> > @rem where mscvenv.cmd is:
> > @rem ------------------------
> > @rem script to build clang libraries
> > set ROOT=%cd%\..
> > set PATH=%ROOT%\..\msvc\bin;%ROOT%\..\cmake\bin;%PATH%
> > set INCLUDE=%ROOT%\..\msvc\include;%ROOT%\..\msvc\sdkinclude;
> > set LIB=%ROOT%\..\msvc\lib
> > set VCINSTALLDIR=%ROOT%\..\msvc
> > set VSINSTALLDIR=%ROOT%\..\msvc
> >
> > @rem generate cmake makefiles
> > cmake -G "NMake Makefiles" ..\llvm -DCMAKE_BUILD_TYPE=debug
> >
> > @rem build clang
> > set MFLAGS=
> > set MAKEFLAGS=
> > nmake MAKEFLAGS=

This all works great - no errors.

> >
> > @rem ---- this is new ----
> >
> > @rem build the test files
> > set PATH=%ROOT%\..\shared\tools\python;%PATH%
> > cmake --build . --config Debug --target check
> 
> Python must be in the PATH before you generate the makefiles, that means
> before the
> 
> cmake -G "NMake Makefiles" ..\llvm -DCMAKE_BUILD_TYPE=debug
> 
> (also replace `debug' by `Debug', just in case)

That cmake command works just great.
It's the 2nd cmake that fails in lit.

> > @rem install the files so we can run the tests
> > @rem Yuk!  this installs in c:/Program Files (x86)/LLVM
> > nmake MAKEFLAGS= install
> 
> You'll better install after testing succeeds.

Ok - I was just trying the various things you suggested.  I'll delete
that line now that I know it's not needed.

> 
> > @rem now run the tests
> > nmake MAKEFLAGS= clang-test clang-c++tests



More information about the cfe-dev mailing list