[Piglit] [PATCH 02/15] framework: use an OrderedDict for subtest storage

Dylan Baker dylan at pnwbakers.com
Tue Jan 23 01:22:03 UTC 2018


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 99dd373..2a3e0ba 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_)
-- 
git-series 0.9.1


More information about the Piglit mailing list