[PATCH] D104714: [UpdateCCTestChecks] Support --check-globals
Alexander Richardson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 22 15:19:29 PDT 2021
arichardson accepted this revision.
arichardson added a comment.
Thanks for working on this! We have some tests downstream that check globals and currently have to use `// UTC_ARGS: --disable` to manually retain them.
The other update script tests compare to an expected output file instead of using Filecheck directives. For larger tests the separate files are a lot more readable, whereas it doesn't really matter for this test.
================
Comment at: clang/test/utils/update_cc_test_checks/check-globals.test:34
+RUN: %lit %t
+# Lit was successful. Sanity-check the results.
+RUN: %lit %t 2>&1 | FileCheck -check-prefix=LIT-RUN %s
----------------
Running lit to verify that the output is valid could be something we might want to do for the other update script tests. But I guess using the scripts to generate tests that are checked it is usually sufficient.
================
Comment at: llvm/utils/update_cc_test_checks.py:357
continue # Don't append the existing CHECK lines
+ if line.strip() == '//' + common.SEPARATOR:
+ continue
----------------
I feel like this line could do with a comment since it's not immediately obvious why it's needed as part of this commit.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104714/new/
https://reviews.llvm.org/D104714
More information about the cfe-commits
mailing list