[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)
committerEric Fiselier <eric@efcs.ca>
Fri, 19 Dec 2014 22:29:12 +0000 (22:29 +0000)
commit20ca10bd68d34ed218bf1817d22bf25db9998b42
tree1e43540e019e8fbc98d69c94dfec7859cb934e7a
parent52e4ce4a536705e8776c6026ae5bfca5d480ad55
[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

llvm-svn: 224628
llvm/utils/lit/lit/Test.py