[Piglit] [PATCH 03/16] framework: use an OrderedDict for subtest storage

Fabian Bieler fabianbieler at fastmail.fm
Mon Jan 29 00:22:13 UTC 2018


From: Dylan Baker <dylan at pnwbakers.com>

This makes the order of the subtests deterministic. Since piglit test
binaries are expected to enumerate subtests in the same order that
they'll run them this will allow us to know which subtest crashed when
there is a crash.
---
 framework/results.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/results.py b/framework/results.py
index 99dd3735b..2a3e0ba78 100644
--- a/framework/results.py
+++ b/framework/results.py
@@ -41,7 +41,7 @@ __all__ = [
 class Subtests(collections.MutableMapping):
     """A dict-like object that stores Statuses as values."""
     def __init__(self, dict_=None):
-        self.__container = {}
+        self.__container = collections.OrderedDict()
 
         if dict_ is not None:
             self.update(dict_)
-- 
2.15.1



More information about the Piglit mailing list