I'll let you do it then, along with sorting out the macros. I was offering in case you would not be able to get to it for a while.
Btw, did you ever get the tests running on your machine?
I'll let you do it then, along with sorting out the macros. I was offering in case you would not be able to get to it for a while.
Btw, did you ever get the tests running on your machine?
I have not, I was going to look at it tonight. I tried an earlier version and got stuck trying to figure out how to invoke lit.py. Looking over ‘http://llvm.org/docs/TestingGuide.html’ its still clear to be how to do that.
In my setup, I have an out of tree build. Could you give be an example of the command line to invoke the tests?
-Nathan
I have not, I was going to look at it tonight. I tried an earlier version
and got stuck trying to figure out how to invoke lit.py. Looking over
'LLVM Testing Infrastructure Guide — LLVM 18.0.0git documentation’ its still clear to be how to do
that.
In my setup, I have an out of tree build. Could you give be an example of
the command line to invoke the tests?
-Nathan
I also do an out of tree build. You should be able to run it from
inside of visual studio by just building the check project. I ripped
out the command from the visual studio project because I wanted to be
able to run tests on single files. All of the paths are absolute, but
here's my script:
@echo off
sed -e s#@LLVM_SOURCE_DIR@#C:/Users/Michael/Projects/llvm# ^
-e s#@LLVM_BINARY_DIR@#C:/Users/Michael/Projects/llvm-build/VS9# ^
-e s#@LLVM_TOOLS_DIR@#C:/Users/Michael/Projects/llvm-build/VS9/bin/Debug# ^
-e s#@LLVMGCCDIR@## ^
-e s#@PYTHON_EXECUTABLE@#C:/Python26/python.exe# ^
C:/Users/Michael/Projects/llvm/test/lit.site.cfg.in ^
> C:/Users/Michael/Projects/llvm-build/VS9/test/lit.site.cfg
sed -e s#@LLVM_SOURCE_DIR@#C:/Users/Michael/Projects/llvm# ^
-e s#@LLVM_BINARY_DIR@#C:/Users/Michael/Projects/llvm-build/VS9# ^
-e s#@LLVM_TOOLS_DIR@#C:/Users/Michael/Projects/llvm-build/VS9/bin/Debug# ^
-e s#@LLVMGCCDIR@## ^
-e s#@LLVM_BUILD_MODE@#Debug# ^
-e s#@ENABLE_SHARED@#0# ^
-e s#@SHLIBPATH_VAR@#LD_LIBRARY_PATH# ^
C:/Users/Michael/Projects/llvm/test/Unit/lit.site.cfg.in ^
> C:/Users/Michael/Projects/llvm-build/VS9/test/Unit/lit.site.cfg
"C:\Python26\python.exe" C:/Users/Michael/Projects/llvm/utils/lit/lit.py ^
--param
llvm_site_config=C:/Users/Michael/Projects/llvm-build/VS9/test/lit.site.cfg
^
--param
llvm_unit_site_config=C:/Users/Michael/Projects/llvm-build/VS9/test/Unit/lit.site.cfg
^
-sv ^
--no-progress-bar ^
C:/Users/Michael/Projects/llvm-build/VS9/test/%1"
I run it from my llvm-build/VS9 directory which is the root of my out
of source build.
You can generate the exact same thing by opening up
build-dir/test/check.vcproj in a text editor and then go to the bottom
and grab the CommandLine attribute off one of the tools and replace
$(OutDir) with either Debug or Release. This will have all the correct
paths for your system.
Once I have this, I just run:
C:\Users\Michael\Projects\llvm-build\VS9>run-tests.bat MC/COFF/basic-coff.ll
I wonder if something like this should be added to CMake for MSVC
generators. Using visual studio to run tests is rather useless unless
you want to run all of them.
- Michael Spencer