Add support for generating LNT JSON report file format in version 2 in
the test data creation library. All unit tests introduced in earlier
patch for existing code pass with this new code.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lnt/testing/__init__.py | ||
---|---|---|
52 ↗ | (On Diff #213460) | Are these comments appropriate? |
What does this mean for the existing v1 users? Will they continue using v1 format, i.e. will LNT keep using whatever it was using before this patch or will it switch to v2? Btw, is there some place/short summary of the rationale behind v2? Not really related to this patch per se, just want to understand the implication of the new format for the downstream users.
Yes existing users will still use the v1 format. The API is just extended to be able create a v2 format. As to the rationale I guess https://reviews.llvm.org/D34584 should contain some info.
I see. It also looks like "run_order" was switched to llvm_project_revision for some reason (I couldn't quite get why - is it simply because the old schema used it? Seems not worth it even if it's hard to correct it in LNT), but if it won't change the behavior (i.e. produced reports) for existing LNT users then it's fine. There seems to be some confusion around what run order is supposed to be already.
I agree that run_order is a nicer name since one might want to use lnt for something else than llvm. But that ought to be done as a separate patch, this just allows producer to generate a v2 format.
lnt/testing/__init__.py | ||
---|---|---|
52 ↗ | (On Diff #213460) | Ping? |
lnt/testing/__init__.py | ||
---|---|---|
52 ↗ | (On Diff #213460) | assert self.report_version <= 2, "This library only supports v2 and newer." When someone hits an assertion, it is nice to see the assertion message, instead of having to navigate to the code. |
lnt/testing/__init__.py | ||
---|---|---|
52 ↗ | (On Diff #213460) | How about now? |