[LLVMdev] lit: deprecating trailing \ in RUN lines
Alp Toker
alp at nuanti.com
Sun Dec 8 02:11:11 PST 2013
I'd like to propose deprecating and shortly thereafter removing the lit
test runner feature that concatenates RUN lines ending in a trailing \
*Rationale:**
*
* Trailing \ has a special meaning in various language standards that
we support nowadays. In the C preprocessor, for example, it's
handled _before_ comments. Various compilers handle this differently
and it introduces needless incompatibilities.
* Forgetting the trailing \ between two RUN lines causes the lines to
be run individually. People have checked in tests which they
believed were getting run whereas the features being tested were
actually silently broken. I've been committing fixes for some of
these but it's exceptionally time-consuming to hunt them down after
the fact.
* Removing trailing \ will introduce the neat property that one RUN
line corresponds precisely to one command that's executed. This is
good for humans and will enable simplifications in the test runner.
* Eliminating the trailing \ syntax will unblock work on improved
failure source locations in lit. Right now, when the builders
encounter a test RUN failure it's a matter of guesswork as to which
RUN line is failing, and the cycle of commit-fix-and-watch-buildbots
is laborious. We've all wasted time with this at some point and can
totally do better.
*Considerations:*
* Some run lines will now go over 80 columns. I suggest living with it
as a fact of life, or simplifying the lines on a case by case basis
-- exceptionally long RUN lines and pipe sequences can often be
replaced with a more idiomatic sequence of commands that would help
isolate test failures more rapidly.
* There are external projects relying on RUN lines with a trailing \.
It'll be difficult to fix them all in one go.
For these reasons, I propose fixing the core LLVM modules to begin and
diagnosing with a lit warning for everyone else. That would be
sufficient to switch on the enhanced lit diagnostics* with line
information on the llvm.org builders which is where most time is wasted
today.
* Separate patch, will post after this one is resolved.
Alp.
--
http://www.nuanti.com
the browser experts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131208/978c1e6b/attachment.html>
More information about the llvm-dev
mailing list