https://reviews.llvm.org/D69701 added support for on-the-fly argument changes for update scripts. I recently wanted to keep some manual check lines in a test generated by update_cc_test_checks.py in our CHERI fork, so this commit adds support for UTC_ARGS in update_cc_test_checks.py. And since I was refactoring the code to be in common.py, I also added it for update_llc_test_checks.py. Reviewed By: jdoerfert, MaskRay Differential Revision: https://reviews.llvm.org/D78478
19 lines
1.0 KiB
Plaintext
19 lines
1.0 KiB
Plaintext
## Basic test checking that update_cc_test_checks.py works as expected for
|
|
## functions with mangled names
|
|
# RUN: cp -f %S/Inputs/mangled_names.c %t.c && %update_cc_test_checks -v %t.c
|
|
# RUN: diff -u %t.c %S/Inputs/mangled_names.c.expected
|
|
## Check that running the script again does not change the result:
|
|
# RUN: %update_cc_test_checks -v %t.c
|
|
# RUN: diff -u %t.c %S/Inputs/mangled_names.c.expected
|
|
## Also try the --function-signature flag
|
|
# RUN: %update_cc_test_checks %t.c --function-signature
|
|
# RUN: diff -u %t.c %S/Inputs/mangled_names.c.funcsig.expected
|
|
## Running it again should implicitly add the function-signature flag due to UTC_ARGS:
|
|
# RUN: %update_cc_test_checks %t.c
|
|
# RUN: diff -u %t.c %S/Inputs/mangled_names.c.funcsig.expected
|
|
## Verify that running without the --function-signature flag removes the -SAME: lines:
|
|
## We have to remove the UTC_ARGS comment first:
|
|
# RUN: grep -v UTC_ARGS %t.c > %t-no-args.c
|
|
# RUN: %update_cc_test_checks %t-no-args.c
|
|
# RUN: diff -u %t-no-args.c %S/Inputs/mangled_names.c.expected
|