[PATCH] D11330: [LIT] Add a .gitignore to llvm/utils/lit

Chandler Carruth chandlerc at gmail.com
Mon Jul 20 18:19:11 PDT 2015


chandlerc added a comment.

In http://reviews.llvm.org/D11330#208733, @EricWF wrote:

> In http://reviews.llvm.org/D11330#208648, @chandlerc wrote:
>
> > So, I don't think we should support testing in-tree because I don't like dirtying the tree.
>
>
> "testing in-tree" is probably the wrong way to describe it. Currently LIT doesn't generate a `check-lit` rule
>  or a `lit.site.cfg` file. The only way (that I know of) to test LIT is to run `lit.py llvm-src/utils/lit/tests`. Because this doesn't
>  set the `config.test_exec_root` option the ShTest temporary directory will be `llvm-src/utils/lit/tests/Output`.
>
> One way to keep the tree clean would be to set `config.test_exec_root` to a created temporary directory. However
>  I don't think this directory can be cleaned up though (other than by the OS).


Doing this or finding some other way of testing lit without dirtying the source tree sounds like the better fix to me.

> 

> 

> In http://reviews.llvm.org/D11330#208648, @chandlerc wrote:

> 

> > What is the issue with .pyc files? I don't see how you get to that being a problem.

> 

> 

> This is a problem I have outside of my LLVM work (so it's not a real reason to make this change). I use LIT on other projects as a git submodule. The LIT submodule is just `llvm/utils/lit` so `llvm/.gitignore` is not present. When python ends up generating the `llvm/utils/lit/lit/*.pyc` files they are not ignored by version control.


Well, you're dropping your submodule into some other tree, use its .gitignore? I guess that doesn't work because of how submodules work? You can create a clone-local ignores file, maybe use that?

Anyways, I don't think we should work around this in LLVM.

We could graduate lit to a full project and that would fix this. But I don't really think we should do that either, because I think it is useful for lit to remain crazy simple and *only* serve the purposes that LLVM testing has for it, and not become a fully generic test runner.

My 2 cents, others might disagree.

> 

> 

> In http://reviews.llvm.org/D11330#208658, @jroelofs wrote:

> 

> > If you don't want *.pyc files, why not set the `PYTHONDONTWRITEBYTECODE` env var, or `sys.dont_write_bytecode = false`, or use `python -B`?

> 

> 

> I don't mind the `*.pyc` files, I just want version control to ignore them when I'm using LIT as a submodule.





Repository:
  rL LLVM

http://reviews.llvm.org/D11330







More information about the llvm-commits mailing list