[cfe-dev] Testing using MSYS + CMake
Óscar Fuentes
ofv at wanadoo.es
Sat Mar 19 12:26:55 PDT 2011
Matthieu Monrocq
<matthieu.monrocq at gmail.com> writes:
> Until now I hadn't written any test, so I would just play them all using the
> following command on MSYS:
>
> $ cd ${BUILD_DIR}
> $ make clang-test
>
> I've written one test though, and I'd like to check it out before submitting
> it in a patch... and I'd like to test *by itself* instead of running the
> whole test suite.
>
> I've tried to invoke lit.py directly, following the Hacking on Clang
> commands, unfortunately it complains about missing site configuration, and I
> am quite at a loss.
>
> How does one play a single test on MSYS, using lit.py either directly or via
> the CMake Makefiles ?
After some fight I was successful with
$ python ../llvm/utils/lit/lit.py -sv --no-progress-bar --param=llvm_site_config=test/lit.site.cfg --param=build_config= ../llvm/test/Bitcode/null-type.ll
(for LLVM)
$ python ../llvm/utils/lit/lit.py -sv --no-progress-bar --param=llvm_site_config=test/lit.site.cfg --param=build_config= --param=clang_site_config=tools/clang/test/lit.site.cfg ../llvm/tools/clang/test/Sema/annotate.c
(for Clang)
The commands are executed from the root of the build directory. The
build directory is at the same level as the sources:
llvm/
build/
More information about the cfe-dev
mailing list