Files
clang-p2996/clang/test/utils/update_cc_test_checks/global-value-regex.test
Joel E. Denny 2f5b2ea6cd [UpdateCCTestChecks] Implement --global-value-regex
`--check-globals` activates checks for all global values, and
`--global-value-regex` filters them.  For example, I'd like to use it
in OpenMP offload codegen tests to check only global variables like
`.offload_maptypes*`.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D104742
2021-07-20 11:23:20 -04:00

19 lines
655 B
Plaintext

RUN: rm -rf %t && mkdir %t
# Check --global-value-regex.
RUN: cp %S/Inputs/global-value-regex.c %t/test.c
RUN: %update_cc_test_checks %t/test.c --check-globals \
RUN: --global-value-regex "foo\.."
RUN: diff -u %S/Inputs/global-value-regex.c.expected %t/test.c
# Check that the generated directives actually work correctly.
RUN: cp %S/Inputs/lit.cfg.example %t/lit.cfg
# Show lit failures while avoiding confusing FileCheck input dump nesting.
RUN: %lit %t
# Lit was successful. Sanity-check the results with deterministic test order.
RUN: rm %t/.lit_test_times.txt
RUN: %lit %t 2>&1 | FileCheck %s
CHECK: Testing: 1 tests
CHECK: PASS: {{.*}} test.c