This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] [test] Fix NameError when loading lit.cfg.py for crt
ClosedPublic

Authored by broadwaylamb on May 13 2020, 11:34 AM.

Details

Summary

The execute_external global variable is defined in [lit.common.cfg.py](https://github.com/llvm/llvm-project/blob/fcfb3170a776f89dde4de8ee105c99e10660f455/compiler-rt/test/lit.common.cfg.py#L18-L27) and used here (on lines 23 and 39). However, this variable is not visible in configs that are loaded independently.

Explicitly assign it to the correct value to avoid NameError.

Diff Detail

Event Timeline

broadwaylamb created this revision.May 13 2020, 11:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 13 2020, 11:34 AM
Herald added subscribers: Restricted Project, dberris. · View Herald Transcript
broadwaylamb edited the summary of this revision. (Show Details)May 13 2020, 11:34 AM
compnerd added inline comments.May 13 2020, 4:43 PM
compiler-rt/test/crt/lit.cfg.py
12

I don't think that we should try to dig through the test_format type if possible. Why not replicate the check for LIT_USE_INTERNAL_SHELL?

Copy the logic of setting execute_external from lit.common.cfg.py.

@compnerd can I ask you to take a look?

phosek accepted this revision.Jun 1 2020, 10:26 AM

LGTM

This revision is now accepted and ready to land.Jun 1 2020, 10:26 AM
compnerd accepted this revision.Jun 3 2020, 9:36 AM

Do you have commit permissions or do you need us to land this for you?

Do you have commit permissions or do you need us to land this for you?

I’ll commit it, thanks

This revision was automatically updated to reflect the committed changes.