// // Copyright 2020 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Simple unit test suite that prints out system info as JSON. // // Example output for a Windows/NV machine: // // { // "activeGPUIndex": 0, // "isOptimus": false, // "isMacSwitchable": false, // "machineManufacturer": "", // "machineModelVersion": "", // "gpus": [ // { // "vendorId": 4318, // "deviceId": 7040, // "driverVendor": "NVIDIA Corporation", // "driverVersion": "452.6.0.0", // "driverDate": "", // "detailedDriverVersion": { // "major": 452, // "minor": 6, // "subMinor": 0, // "patch": 0 // } // } // ] // } #include "gpu_info_util/SystemInfo.h" #include <gtest/gtest.h> #include <rapidjson/document.h> #include <rapidjson/prettywriter.h> #include <rapidjson/stringbuffer.h> #include <cstdlib> #include "common/debug.h" #if defined(ANGLE_ENABLE_VULKAN) # include "gpu_info_util/SystemInfo_vulkan.h" #endif // defined(ANGLE_ENABLE_VULKAN) js; bool gFailedToFindGPU; constexpr char kRenderTestOutputDir[] = …; int main(int argc, char **argv) { … } TEST(ANGLE, SystemInfo) { … }