[PATCH] D68146: [tests] Output of od can be lower or upper case (llvm-objcopy/yaml2obj).

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 03:58:40 PDT 2019


jhenderson added a comment.

In D68146#1686536 <https://reviews.llvm.org/D68146#1686536>, @alexshap wrote:

> Oh, this is painful.
>  I'm curious - what do you think about some other options, e.g. about extending FileCheck to add support for case insensitiveness, 
>  but maybe smb else might have a better idea


I agree it's painful, and I think a FileCheck option is ultimately the best solution, but as an interim non-terrible solution, how about using `tr` to convert the `od` output from upper-case to lower-case:

  # RUN: od -t x1 %t | tr '[:upper:]' '[:lower:]' | FileCheck ...

You can also use `tr a-z A-Z` in theory, but that relies on posix conformity of the od tool, which from experience I don't think we can rely on (e.g. I know that at least one version of `od` used on the Greendragon buildbots that doesn't allow command-lines to be ordered in somewhat arbitrary ways). I think therefore the character classes might be more reliable.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68146/new/

https://reviews.llvm.org/D68146





More information about the llvm-commits mailing list