1# encoding=utf-8 2# Copyright © 2016, 2019 Intel Corporation 3 4# Permission is hereby granted, free of charge, to any person obtaining a copy 5# of this software and associated documentation files (the "Software"), to deal 6# in the Software without restriction, including without limitation the rights 7# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8# copies of the Software, and to permit persons to whom the Software is 9# furnished to do so, subject to the following conditions: 10 11# The above copyright notice and this permission notice shall be included in 12# all copies or substantial portions of the Software. 13 14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20# SOFTWARE. 21 22"""Shared data for backend tests.""" 23 24from framework.options import OPTIONS 25 26 27INITIAL_METADATA = { 28 'name': 'name', 29 'options': dict(OPTIONS), 30 'info': { 31 'system': {} 32 } 33} 34 35# This is current JSON data, in raw form with only the minimum required 36# changes. This does not contain piglit specifc objects, only strings, floats, 37# ints, and Nones (instead of JSON's null) 38JSON = { 39 "results_version": 10, 40 "time_elapsed": { 41 "start": 1469638791.2351687, 42 "__type__": "TimeAttribute", 43 "end": 1469638791.4387212 44 }, 45 "tests": { 46 "spec@!opengl 1.0@gl-1.0-readpixsanity": { 47 "dmesg": "", 48 "traceback": None, 49 "err": "piglit: error: waffle_display_connect failed due to " 50 "WAFFLE_ERROR_UNKNOWN: open drm file for gbm failed\n", 51 "subtests": { 52 "__type__": "Subtests" 53 }, 54 "out": "", 55 "exception": None, 56 "command": "/home/user/source/piglit/bin/gl-1.0-readpixsanity " 57 "-auto -fbo", 58 "time": { 59 "start": 1469638791.2383287, 60 "__type__": "TimeAttribute", 61 "end": 1469638791.2439244 62 }, 63 "pid": [11768], 64 "__type__": "TestResult", 65 "returncode": 1, 66 "result": "fail", 67 "environment": ("PIGLIT_SOURCE_DIR=\"/home/user/source/piglit\" " 68 " PIGLIT_PLATFORM=\"gbm\"") 69 } 70 }, 71 "options": { 72 "dmesg": False, 73 "concurrent": "some", 74 "include_filter": [], 75 "monitored": False, 76 "execute": True, 77 "valgrind": False, 78 "profile": [ 79 "sanity" 80 ], 81 "log_level": "quiet", 82 "env": { 83 "PIGLIT_SOURCE_DIR": "/home/user/source/piglit", 84 "PIGLIT_PLATFORM": "gbm" 85 }, 86 "platform": "gbm", 87 "sync": False, 88 "exclude_tests": [], 89 "exclude_filter": [] 90 }, 91 "name": "foo", 92 "__type__": "TestrunResult", 93 "info": { 94 "system": { 95 "lspci": "00:00.0 Host bridge...", 96 }, 97 }, 98 "totals": { 99 "spec": { 100 '__type__': 'Totals', 101 "warn": 0, 102 "timeout": 0, 103 "skip": 0, 104 "crash": 0, 105 "pass": 0, 106 "fail": 1, 107 "dmesg-warn": 0, 108 "incomplete": 0, 109 "notrun": 0, 110 "dmesg-fail": 0 111 }, 112 "": { 113 '__type__': 'Totals', 114 "warn": 0, 115 "timeout": 0, 116 "skip": 0, 117 "crash": 0, 118 "pass": 0, 119 "fail": 1, 120 "dmesg-warn": 0, 121 "incomplete": 0, 122 "notrun": 0, 123 "dmesg-fail": 0 124 }, 125 "spec@!opengl 1.0": { 126 '__type__': 'Totals', 127 "warn": 0, 128 "timeout": 0, 129 "skip": 0, 130 "crash": 0, 131 "pass": 0, 132 "fail": 1, 133 "dmesg-warn": 0, 134 "incomplete": 0, 135 "notrun": 0, 136 "dmesg-fail": 0 137 }, 138 "root": { 139 '__type__': 'Totals', 140 "warn": 0, 141 "timeout": 0, 142 "skip": 0, 143 "crash": 0, 144 "pass": 0, 145 "fail": 1, 146 "dmesg-warn": 0, 147 "incomplete": 0, 148 "notrun": 0, 149 "dmesg-fail": 0 150 } 151 } 152} 153