Fix lit/example/many-tests pickling issue
ClosedPublic

Authored by lanza on Mon, Aug 27, 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
lanza created this revision.Mon, Aug 27, 3:56 PM
lanza added a comment.Mon, Aug 27, 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.Tue, Aug 28, 9:14 PM
sas accepted this revision.Thu, Sep 6, 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.Thu, Sep 6, 10:05 AM

@xiaobai Could you land this?

This revision was automatically updated to reflect the committed changes.