This fixes trying to load .tmp files that don't get moved during an
interrupted run.

bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101503
Signed-off-by: Dylan Baker <[email protected]>
---
 framework/backends/json.py                | 5 +++--
 unittests/framework/backends/test_json.py | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/framework/backends/json.py b/framework/backends/json.py
index 26cca7a33..98689cc09 100644
--- a/framework/backends/json.py
+++ b/framework/backends/json.py
@@ -126,8 +126,9 @@ class JSONBackend(FileBackend):
 
         """
         tests_dir = os.path.join(self._dest, 'tests')
-        file_list = sorted(os.listdir(tests_dir),
-                           key=lambda p: int(os.path.splitext(p)[0]))
+        file_list = sorted(
+            (f for f in os.listdir(tests_dir) if f.endswith('.json')),
+            key=lambda p: int(os.path.splitext(p)[0]))
 
         # If jsonstreams is not present then build a complete tree of all of
         # the data and write it with json.dump
diff --git a/unittests/framework/backends/test_json.py 
b/unittests/framework/backends/test_json.py
index a61425215..94d8fbf54 100644
--- a/unittests/framework/backends/test_json.py
+++ b/unittests/framework/backends/test_json.py
@@ -146,7 +146,6 @@ class TestJSONBackend(object):
 
             jsonschema.validate(json_, schema)
 
-        @pytest.mark.xfail
         def test_ignores_invalid(self, tmpdir):
             test = backends.json.JSONBackend(six.text_type(tmpdir))
             test.initialize(shared.INITIAL_METADATA)
-- 
2.13.1

_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to