diff options
| author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-07-08 15:24:31 +0300 |
|---|---|---|
| committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-07-08 16:34:48 +0300 |
| commit | 2939317205d1f39eefebec7bd6ba01faaa0f9369 (patch) | |
| tree | 45f4ba1e0bca7dc394b7fa77ca3122f1121a6a55 /poky/scripts/lib/resulttool/resultutils.py | |
| parent | 963b1beb7e04e1c6c55bea2104b856e3121202db (diff) | |
| download | openbmc-2.7.0-rc1.tar.xz | |
reset upstream subtrees to warrior HEAD2.7.0-rc1
Reset the following subtrees on warrior HEAD:
meta-security: 4f7be0d252(warrior)
poky: 38d5c8ea98(warrior)
meta-raspberrypi: 6c73694912(warrior)
meta-openembedded: 6fa72d587a(warrior)
Change-Id: Id2550baeb90de14bdd9ee8c06f2c619fc719bc68
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/scripts/lib/resulttool/resultutils.py')
| -rw-r--r-- | poky/scripts/lib/resulttool/resultutils.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/poky/scripts/lib/resulttool/resultutils.py b/poky/scripts/lib/resulttool/resultutils.py index e595c185df..ea4ab42d9a 100644 --- a/poky/scripts/lib/resulttool/resultutils.py +++ b/poky/scripts/lib/resulttool/resultutils.py @@ -42,12 +42,10 @@ def is_url(p): """ return p.startswith('http://') or p.startswith('https://') -extra_configvars = {'TESTSERIES': ''} - # # Load the json file and append the results data into the provided results dict # -def append_resultsdata(results, f, configmap=store_map, configvars=extra_configvars): +def append_resultsdata(results, f, configmap=store_map): if type(f) is str: if is_url(f): with urllib.request.urlopen(f) as response: @@ -63,15 +61,12 @@ def append_resultsdata(results, f, configmap=store_map, configvars=extra_configv for res in data: if "configuration" not in data[res] or "result" not in data[res]: raise ValueError("Test results data without configuration or result section?") - for config in configvars: - if config == "TESTSERIES" and "TESTSERIES" not in data[res]["configuration"]: - data[res]["configuration"]["TESTSERIES"] = testseries - continue - if config not in data[res]["configuration"]: - data[res]["configuration"][config] = configvars[config] + if "TESTSERIES" not in data[res]["configuration"]: + data[res]["configuration"]["TESTSERIES"] = testseries testtype = data[res]["configuration"].get("TEST_TYPE") if testtype not in configmap: raise ValueError("Unknown test type %s" % testtype) + configvars = configmap[testtype] testpath = "/".join(data[res]["configuration"].get(i) for i in configmap[testtype]) if testpath not in results: results[testpath] = {} @@ -81,16 +76,16 @@ def append_resultsdata(results, f, configmap=store_map, configvars=extra_configv # Walk a directory and find/load results data # or load directly from a file # -def load_resultsdata(source, configmap=store_map, configvars=extra_configvars): +def load_resultsdata(source, configmap=store_map): results = {} if is_url(source) or os.path.isfile(source): - append_resultsdata(results, source, configmap, configvars) + append_resultsdata(results, source, configmap) return results for root, dirs, files in os.walk(source): for name in files: f = os.path.join(root, name) if name == "testresults.json": - append_resultsdata(results, f, configmap, configvars) + append_resultsdata(results, f, configmap) return results def filter_resultsdata(results, resultid): |
