summaryrefslogtreecommitdiff
path: root/framework/results.py
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2015-01-15 15:40:50 -0800
committerDylan Baker <baker.dylan.c@gmail.com>2015-02-23 17:32:51 -0800
commit99ce9512f70d534a5f7afe96f7142bf5f30fb8f6 (patch)
treec91ab704ed303618aea7f6cb13987d78f7f0c645 /framework/results.py
parent87bb538a55bd5a06e99def1365576b4d76793900 (diff)
framework: update json version to v4 to fix test changes
Update the json version to 4 to account for the changed names. This patch will need to be squashed into the one before it to create a history that can be bisected across successfully, but for review purposes I think it makes sense to split it. v2: - Replace use of json with inline data. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Diffstat (limited to 'framework/results.py')
-rw-r--r--framework/results.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/framework/results.py b/framework/results.py
index 68befd555..cdbf67102 100644
--- a/framework/results.py
+++ b/framework/results.py
@@ -242,6 +242,7 @@ def update_results(results, filepath):
0: _update_zero_to_one,
1: _update_one_to_two,
2: _update_two_to_three,
+ 3: _update_three_to_four,
}
while results.results_version < CURRENT_JSON_VERSION:
@@ -419,3 +420,35 @@ def _update_two_to_three(results):
results.results_version = 3
return results
+
+
+def _update_three_to_four(results):
+ """Update results v3 to v4.
+
+ This update requires renaming a few tests. The complete lists can be found
+ in framework/data/results_v3_to_v4.json, a json file containing a list of
+ lists (They would be tuples if json has tuples), the first element being
+ the original name, and the second being a new name to update to
+
+ """
+ mapped_updates = [
+ ("spec/arb_texture_rg/fs-shadow2d-red-01",
+ "spec/arb_texture_rg/execution/fs-shadow2d-red-01"),
+ ("spec/arb_texture_rg/fs-shadow2d-red-02",
+ "spec/arb_texture_rg/execution/fs-shadow2d-red-02"),
+ ("spec/arb_texture_rg/fs-shadow2d-red-03",
+ "spec/arb_texture_rg/execution/fs-shadow2d-red-03"),
+ ("spec/arb_draw_instanced/draw-non-instanced",
+ "spec/arb_draw_instanced/execution/draw-non-instanced"),
+ ("spec/arb_draw_instanced/instance-array-dereference",
+ "spec/arb_draw_instanced/execution/instance-array-dereference"),
+ ]
+
+ for original, new in mapped_updates:
+ if original in results.tests:
+ results.tests[new] = results.tests[original]
+ del results.tests[original]
+
+ results.results_version = 4
+
+ return results