This is an archive of the discontinued LLVM Phabricator instance.

[lit] Remove lit's REQUIRES-ANY directive
ClosedPublic

Authored by thopre on Dec 12 2019, 3:44 AM.

Details

Summary

Remove REQUIRES-ANY alias lit directive since it is hardly used and can
be easily implemented using an OR expression using REQUIRES. Fixup
remaining testcases still using REQUIRES-ANY.

Diff Detail

Event Timeline

thopre created this revision.Dec 12 2019, 3:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2019, 3:44 AM

I'd rather see REQUIRES-ANY deprecated/removed, in favor of using expressions in REQUIRES. (REQUIRES-ANY predates expressions.)
IIRC it is used rarely and it would not be a big deal to eliminate it.

I have little experience with REQUIRES, etc., but a quick git grep suggests Paul's suggestion is a reasonable path forward.

thopre updated this revision to Diff 233712.Dec 12 2019, 4:37 PM

Remove REQUIRES-ANY lit directive

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 12 2019, 4:37 PM
Herald added subscribers: Restricted Project, cfe-commits, luismarques and 21 others. · View Herald Transcript
thopre retitled this revision from [lit] Document lit's REQUIRES-ANY to [lit] Remove lit's REQUIRES-ANY directive.Dec 12 2019, 4:38 PM
thopre edited the summary of this revision. (Show Details)

Nice cleanup!

gparker42 accepted this revision.Dec 16 2019, 9:59 PM

Good. REQUIRES-ANY was preserved when the boolean expressions were added because libc++ was still using it. libc++ has since changed their tests so removing it should be fine now.
(previous discussion: D18185)

The risk for any remaining users of REQUIRES-ANY is that they will see a test run too often. That's an acceptable failure mode (unlike silently not running the test at all).

This revision is now accepted and ready to land.Dec 16 2019, 9:59 PM
This revision was automatically updated to reflect the committed changes.

It looks like this caused build bot failures:
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/28928/steps/ninja%20check%201/logs/FAIL%3A%20lit%3A%3A%20shtest-format.py

/home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/utils/lit/tests/shtest-format.py:52:10: error: CHECK: expected string not found in input
# CHECK: UNSUPPORTED: shtest-format :: requires-any-missing.txt
         ^
<stdin>:71:33: note: scanning from here
PASS: shtest-format :: pass.txt (8 of 22)
                                ^
<stdin>:72:1: note: possible intended match here
UNSUPPORTED: shtest-format :: requires-missing.txt (9 of 22)
^

This breaks the lit test suite. llvm/utils/lit/tests/shtest-format.py needs to be updated for the removed tests.

This breaks the lit test suite. llvm/utils/lit/tests/shtest-format.py needs to be updated for the removed tests.

This is embarrassing. Thanks @nemanjai for fixing this. I did run the tests and remember having one FAIL which I could reproduce without the patch applied. I presume ninja check-all includes those 2 tests so I'm not sure how I missed it. On a related note, I used to receive mail notification when one of my commit would make a buildbot fail but don't anymore. Is there a way to register for those mail notification?

This is embarrassing.

It happens.

I presume ninja check-all includes those 2 tests so I'm not sure how I missed it.

It should.

On a related note, I used to receive mail notification when one of my commit would make a buildbot fail but don't anymore.

Sometimes I don't see emails if a bot was already broken. I noticed this fail only after pulling and running check-lit locally.

Is there a way to register for those mail notification?

Not sure. I thought it was based on the commit author field.

llvm/utils/lit/lit/TestRunner.py