This is an archive of the discontinued LLVM Phabricator instance.

Update lld test suite to include a substitution for the current LLVM version and make the test parametric
AbandonedPublic

Authored by mehdi_amini on Aug 15 2020, 2:41 PM.

Details

Summary

This makes the test introduced in 537f5483fe4e more robust with respect
to the actual version number. The previous regex restricted the version
to start with a leading 1 which was overly restrictive.

Diff Detail

Event Timeline

mehdi_amini created this revision.Aug 15 2020, 2:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 15 2020, 2:41 PM
mehdi_amini requested review of this revision.Aug 15 2020, 2:41 PM
int3 added a subscriber: ruiu.Aug 15 2020, 5:22 PM
int3 added inline comments.
lld/test/lit.cfg.py
86

@ruiu has pushed back against using substitutions previously (in D77086). Could we just make the regex more flexible?

int3 added a reviewer: ruiu.Aug 15 2020, 5:22 PM
mehdi_amini added inline comments.Aug 15 2020, 5:25 PM
lld/test/lit.cfg.py
86

I already made the regex less strict, if we can leave it as-is that works for us.

MaskRay added a comment.EditedAug 15 2020, 5:33 PM

I'd suggest overridding the version field with getenv("LLD_VERSION"). See ELF/SyntheticSections.cpp:getVersion.

A mechanism allowing easy cross-version comparison is useful.

lld/test/lit.cfg.py
86

If we override the behavior with an environment variable, the lit substitution can be removed.

mehdi_amini abandoned this revision.Sep 7 2020, 5:14 PM