labath added a comment.

I think that something like this would go a long way towards solving the 
problems with lit tests we're having in lldb.

However, the part that is not clear to me is whether it is actually necessary 
to modify lit (shtest) to achieve this. It seems to me an equivalent effect to 
the command from the motivating example could be achieved via something like

  RUN: %compile --source=%p/Inputs/foo.cpp --mode=debug --opt=none --link=no 
--output=%t.o --clean=yes

where `%compile` expands to a python script living somewhere in the lldb 
repository. This script could do the same thing that the implementation of 
`COMPILE: ` would do, except it would be done in a separate process.

The only downside of that I see is the extra process will incur some overhead, 
slowing down the testing, but I am not sure if we care about that (or if it 
would even be measurable). OTOH, the benefits are:

- decreased complexity of lit
- decreased level of surprise of developers seeing new lit commands
- easier reproducibility of tests when debugging (just copy paste the 
`%compile` run-line to rebuild the executable)


https://reviews.llvm.org/D54731



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to