This is an archive of the discontinued LLVM Phabricator instance.

[UpdateTestChecks] Make generation of UTC_ARGS: comment more robust
ClosedPublic

Authored by arichardson on Apr 22 2020, 2:19 AM.

Details

Summary

We now use the argparse Action objects to determine the name of the flags.
This fixes cases where the key for the stored result ('dest') is not the
same as the command line flag (e.g. --enable/--disable).
Also add a test that --disabled can be part of the initial UTC_ARGS.

This is split out from D78478

Diff Detail

Event Timeline

arichardson created this revision.Apr 22 2020, 2:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2020, 2:19 AM
jdoerfert accepted this revision.Apr 22 2020, 10:36 AM

LGTM, except that we might need an explicit test, see below.

llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/on_the_fly_arg_change.ll.initially_disabled.expected
11

I'm afraid with this line we do not test if the disable in the first line has an effect. We might need another test, sorry.

This revision is now accepted and ready to land.Apr 22 2020, 10:36 AM
arichardson marked an inline comment as done.Apr 22 2020, 1:02 PM
arichardson added inline comments.
llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/on_the_fly_arg_change.ll.initially_disabled.expected
11

We do, without the first disable there would be check lines for the first function. (See the other .expected file for this test)

This revision was automatically updated to reflect the committed changes.