[PATCH] D38010: lit.py: Allow configs and local configs to have a setup_script entry

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 15:44:55 PDT 2017


zturner added a comment.

In https://reviews.llvm.org/D38010#875411, @jordan_rose wrote:

> > Actually, I guess I'm a bit confused. What is this solving that you can't already do in a local config? Couldn't you just embed the stuff you want to execute in the local config?
>
> I felt uncomfortable making the local config files actually have side effects, but really I want to follow up with this by moving the setup tasks into the parallel processing as actual dependencies. This is just the first iteration of the feature. If you think that's not a good direction, though, we could go with one of the other options.
>
> (This also allows for the inheritance of setup logic into subdirectories, but that's not a critical feature for my use case, and indeed it's likely unexpected in many cases.)


This version is better, thanks for making it work with Python scripts.

I'm interested in getting Daniel's input, but I still find it a little strange that we have 2 features that essentially do the same thing.  For example, let's imagine this setup script file contains a block of code X.  Couldn't we just paste X into the `lit.local.cfg` and have it be functionally equivalent but with one less file for the user to deal with?

You mentioned you want to make this work with the multiprocessing pool.  That worries me a little bit because different processes are going to be using the same shared output dir (which isn't created up front by the infrastructure), if I understand correctly.  Like if you have A and A/B and A/C, then we will run the setup script 3 times in parallel all using the same shared output folder.  Is this going to be a source of flakiness?

Still though, let's say we decide that's ok.  In that case, I'm still curious how this would be functionally different from just pasting all the code into a `lit.local.cfg`.  Does that not get run for each subdirectory?


https://reviews.llvm.org/D38010





More information about the llvm-commits mailing list