test_config.js (1153B)
1 /** 2 * AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts 3 **/import { assert, hasFeature } from '../util/util.js'; 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 /** Test configuration options. Globally modifiable global state. */ 72 export const globalTestConfig = { 73 enableDebugLogs: false, 74 maxSubcasesInFlight: 100, 75 subcasesBetweenAttemptingGC: 5000, 76 casesBetweenReplacingDevice: Infinity, 77 testHeartbeatCallback: () => {}, 78 noRaceWithRejectOnTimeout: false, 79 unrollConstEvalLoops: false, 80 compatibility: false, 81 forceFallbackAdapter: false, 82 enforceDefaultLimits: false, 83 blockAllFeatures: false, 84 logToWebSocket: false 85 }; 86 87 // Check if a device is a compatibility device. 88 // Note: The CTS generally, requires that if globalTestConfig.compatibility 89 // is true then the device MUST be a compatibility device since the CTS 90 // is trying to test that compatibility devices have the correct validation. 91 export function isCompatibilityDevice(device) { 92 if (globalTestConfig.compatibility) { 93 assert(!hasFeature(device.features, 'core-features-and-limits')); 94 } 95 return globalTestConfig.compatibility; 96 }