So far, I have been copying .ll lit bases test cases in some
/llvm-project/llvm/test/<directory>
and then running them with
/build-dir/bin/llvm-lit.
Now, I need to run these test cases without adding them to llvm source, using
/build-dir/bin/llvm-lit
or
/install-dir/bin/llvm-lit
So to create similar test suite environment outside of source, I followed:
<https://medium.com/@mshockwave/using-llvm-lit-out-of-tree-5cddada85a78>
with some relevant changes but I am stumbling on error:
AttributeError: 'TestingConfig' object has no attribute 'my_obj_root'
Any changes that I am missing here?
OR
Regardless of the above link. Is there a simpler way to do this where
I can run any IR based test cases outside of llvm source while
referring to the corresponding tool in /build-dir/bin/ or
/install-dir/bin/?
Thanks,
Tejas
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> Hi, I'm the author of that blog post.
Great. That blog post is really helpful.
> Without knowing the details of your issue, my guess is that somehow LIT didn't execute the correct config file.
> Long story short, there are two LIT config files: The one you put in source directory (lit.cfg.py) and the other one (lit.site.cfg.py), which is generated from a template file (lit.site.cfg.py.in), in the build direcotry
> The latter one is the config file LIT should execute first, because it's actually a trampoline that sets up some environment -- the my_obj_root is one of them -- before executing the real config file, lit.cfg.py in the source directory.
Let me explain. Consider the following directory structure (the ones
with -- prefix are subdirs to the upper one):
llvm-project
build-dir (llvm is built here)
install-dir (llvm is installed here)
test-suite
-- tests
---- filename.ll
Now, I want to run test cases (which uses opt, clang, etc) inside the
tests directory using llvm-lit from build-dir or install-dir. After
running llvm-lit on them, the tests should refer to build-dir/bin/ or
install-dir/bin/ binaries to run.
Can you suggest changes from the above blog post for lit.cfg.py,
lit.site.cfg.py.in because I am confused for which file should reside
in what directory in my particular case.