[PATCH] D82233: [lit] Add --show-xxx command line options

Julian Lettner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 16:23:34 PDT 2020


yln marked an inline comment as done.
yln added a comment.

@jdenny

I changed our approach to just adding `--show-<result-code>` flags for all non-failure result codes, just as we already do for `--show-xfail` and `--show-unsupported`.

The help entries for the flags look like this:

  --show-excluded       Show excluded tests (EXCLUDED)
  --show-skipped        Show skipped tests (SKIPPED)
  --show-unsupported    Show unsupported tests (UNSUPPORTED)
  --show-pass           Show passed tests (PASS)
  --show-flakypass      Show passed with retry tests (FLAKYPASS)
  --show-xfail          Show expectedly failed tests (XFAIL)



================
Comment at: llvm/utils/lit/lit/cl_arguments.py:204
+        else:
+           opts.shown_codes.add(lit.Test.ResultCode._instances[code.upper()])
 
----------------
jdenny wrote:
> yln wrote:
> > jdenny wrote:
> > > What happens if there are user-defined result codes that are spelled the same except for case?
> > Unfortunately, this can't be used (yet) to specify user-defined result codes at all.  User codes are usually registered in config files and this code executes before we evaluate configs, i.e., it will print `argument --show: invalid choice: 'user-code' (choose from ...)`
> > 
> > If we think it's worth it then we could push "choice validation" to a later point after we processed the user configs.
> I don't know that `--show` support for user-defined result codes needs to be implemented in this patch.
> 
> In that case, the case-insensitivity issue I raised is not relevant yet, right?  That can be addressed later then.
> 
> In that case, the case-insensitivity issue I raised is not relevant yet, right?
That's right!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82233





More information about the llvm-commits mailing list