This is an archive of the discontinued LLVM Phabricator instance.

Fix lit/example/many-tests pickling issue
ClosedPublic

Authored by lanza on Aug 27 2018, 3:56 PM.

Details

Summary

The multiprocess module uses pickling to transfer
information between processes and does not know how to pickle
the class created in the lit.cfg file and thus the example
fails.

Implement ManyTests in a separate file and import for the
example test passes

Diff Detail

Repository
rL LLVM

Event Timeline

lanza created this revision.Aug 27 2018, 3:56 PM
lanza added a comment.Aug 27 2018, 3:59 PM

Running this test fails due to pickle not being able to find the class given that it's created via exec(compile(str_version_of_file)):

cd llvm/utils/lit
./lit.py examples/many-tests

fails with a pickle error. This fixes it.

lanza edited reviewers, added: ddunbar; removed: dduan.Aug 28 2018, 9:14 PM
sas accepted this revision.Sep 6 2018, 10:05 AM

LGTM but there's a small nit inline.

utils/lit/examples/many-tests/ManyTests.py
15 ↗(On Diff #162766)

You should leave this blank line in place.

This revision is now accepted and ready to land.Sep 6 2018, 10:05 AM

@xiaobai Could you land this?

This revision was automatically updated to reflect the committed changes.