[PATCH] D100998: [sanitizer] Use COMPILER_RT_EMULATOR with gtests
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 22 10:43:51 PDT 2021
delcypher added a comment.
The approach looks good but I'd like to see us type check the new `run_under` parameter.
================
Comment at: llvm/utils/lit/lit/formats/googletest.py:24
self.test_suffixes = {exe_suffix, test_suffix + '.py'}
+ self.run_under = run_under
----------------
It looks like we require `self.run_under` to be a list but we never check that it is one. We should check the type here and fail if it's wrong with `litConfig.fatal_error()`.
It looks like
```lang=python
if emulator:
emulator = shlex.split(emulator)
```
currently ensures we pass in a list but this is not very obvious because at first I thought we were passing in a string.
================
Comment at: llvm/utils/lit/lit/formats/googletest.py:157
+ if self.run_under:
+ cmd = self.run_under + cmd
return cmd
----------------
If `self.run_under` isn't a list then it'll cause problems here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100998/new/
https://reviews.llvm.org/D100998
More information about the llvm-commits
mailing list