[Piglit] [PATCH 1/2] results_v0_tests.py: don't copy data from utils

Dylan Baker baker.dylan.c at gmail.com
Wed Dec 31 11:59:02 PST 2014


The problem with copying DATA from utils is that it is prone to change
as versions are upgraded, while results_vx tests shouldn't change, they
are testing that a result from a specific place in time works.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/tests/results_v0_tests.py | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/framework/tests/results_v0_tests.py b/framework/tests/results_v0_tests.py
index d5197fd..daa9fd5 100644
--- a/framework/tests/results_v0_tests.py
+++ b/framework/tests/results_v0_tests.py
@@ -30,11 +30,23 @@ import framework.results as results
 import framework.tests.utils as utils
 
 
-DATA = copy.deepcopy(utils.JSON_DATA)
-DATA['tests']['sometest']['dmesg'] = ['this', 'is', 'dmesg']
-DATA['tests']['sometest']['info'] = \
-    'Returncode: 1\n\nErrors:stderr\n\nOutput: stdout\n'
+DATA = {}
+DATA['options'] = {
+    'profile': "tests/fake.py",
+    'filter': [],
+    'exclude_filter': [],
+}
+DATA['name'] = 'fake-tests'
+DATA['lspci'] = 'fake'
+DATA['glxinfo'] = 'fake'
+DATA['tests'] = {}
 DATA['tests'].update({
+    'sometest': {
+        'result': 'pass',
+        'time': 0.01,
+        'dmesg': ['this', 'is', 'dmesg'],
+        'info': 'Returncode: 1\n\nErrors:stderr\n\nOutput: stdout\n',
+    },
     'group1/groupA/test/subtest 1': {
         'info': 'Returncode: 1\n\nErrors:stderr\n\nOutput:stdout\n',
         'subtest': {
-- 
2.2.1



More information about the Piglit mailing list