llvm.org GIT mirror llvm / 024a126
Add some info about the pipelines and redirection. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36030 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 12 years ago
1 changed file(s) with 18 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
321321 Tcl will substitute variables and arrange for the pipeline to be executed. If
322322 any process in the pipeline fails, the entire line (and test case) fails too.
323323

324
325

As with a Unix shell, the RUN: lines permit pipelines and I/O redirection

326 to be used. However, the usage is slightly different than for Bash. To check
327 what's legal, see the documentation for the
328 Tcl exec
329 command and the
330 tutorial.
331 The major differences are:

332
333
  • You can't do 2>&1. That will cause Tcl to write to a
  • 334 file named &1. Usually this is done to get stderr to go through
    335 a pipe. You can do that in tcl with |& so replace this idiom:
    336 ... 2>&1 | grep with ... |& grep
    337
  • You can only redirect to a file, not to another descriptor and not from
  • 338 a here document.
    339
  • tcl supports redirecting to open files with the @ syntax but you
  • 340 shouldn't use that here.
    341
    324342
    325343

    Below is an example of legal RUN lines in a .ll file:

    326344