[all-commits] [llvm/llvm-project] 918dad: [test] Avoid unportable echo in Other/lit-quoting.txt

rorth via All-commits all-commits at lists.llvm.org
Sat Aug 14 15:21:25 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 918dad54bd226a8c2fda42bc63dbb1f324bf6c24
      https://github.com/llvm/llvm-project/commit/918dad54bd226a8c2fda42bc63dbb1f324bf6c24
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2021-08-15 (Sun, 15 Aug 2021)

  Changed paths:
    M llvm/test/Other/lit-quoting.txt

  Log Message:
  -----------
  [test] Avoid unportable echo in Other/lit-quoting.txt

`LLVM :: Other/lit-quoting.txt` currently `FAIL`s on Solaris:

  llvm/test/Other/lit-quoting.txt:8:9: error: CHECK2: expected string not found in input
  CHECK2: {{^a\[b\\c$}}
          ^
  <stdin>:1:1: note: scanning from here
  a[b
  ^

This happens because echo with backslashes or special characters is
unportable, as extensively documented in the Autoconf manual.  In the case
at hand, `echo 'a[b\c'` yields `a[b\c` on Linux, but `a[b` (no newline) on
Solaris.

This patch fixes this by using the portable alternative suggested in the
Autoconf manual.

Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, and
`x86_64-pc-linux-gnu`.

Differential Revision: https://reviews.llvm.org/D108031




More information about the All-commits mailing list