OSDN Git Service

[LIT] Add JSONMetricValue type to wrap types supported by the json encoder.
authorEric Fiselier <eric@efcs.ca>
Fri, 19 Dec 2014 22:29:12 +0000 (22:29 +0000)
committerDan Albert <danalbert@google.com>
Thu, 8 Jan 2015 22:44:29 +0000 (14:44 -0800)
commitd813311a35b10e8bf8917e503267de6246446991
tree1546fd470713070fd2593e521ae029ab481534ed
parent00b724930ddd36b279b20252ba7bae51d0a67785
[LIT] Add JSONMetricValue type to wrap types supported by the json encoder.

Summary:
The following types can be encoded and decoded by the json library:
`dict`, `list`, `tuple`, `str`, `unicode`, `int`, `long`, `float`, `bool`, `NoneType`.

`JSONMetricValue` can be constructed with any of these types, and used as part of Test.Result.
This patch also adds a toMetricValue function that converts a value into a MetricValue.

Reviewers: ddunbar, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits, llvm-commits

Differential Revision: http://reviews.llvm.org/D6576

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224628 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 74430387cd6b1d0e3f89b604f747fa53fc3315b3)
utils/lit/lit/Test.py