Show Linux driver information in flutter doctor (#163980)

I have attempted to cherry pick some useful information from eglinfo
which is often requested when resolving issues with rendering.

This information is not required to compile an Flutter application, so
it is a little different to the other displayed information.
This commit is contained in:
Robert Ancell
2025-02-27 12:40:07 +13:00
committed by GitHub
parent b287365b21
commit d64b8e29c3
3 changed files with 546 additions and 0 deletions

View File

@@ -67,6 +67,102 @@ List<FakeCommand> _gtkLibrariesPresentCommands() {
];
}
// A command that will return typical-looking 'eglinfo' output
FakeCommand _eglinfoPresentCommand({
bool wayland = true,
bool x11 = true,
bool core = true,
bool es = true,
}) {
String stdout = '''
EGL client extensions string:
EGL_EXT_client_extensions
''';
if (wayland) {
stdout += '''
Wayland platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL driver name: iris
''';
if (core) {
stdout += '''
OpenGL core profile vendor: Intel
OpenGL core profile renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
OpenGL core profile version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1
OpenGL core profile shading language version: 4.60
OpenGL core profile extensions:
GL_ARB_blend_func_extended, GL_EXT_framebuffer_blit
''';
}
if (es) {
stdout += '''
OpenGL ES profile vendor: Intel
OpenGL ES profile renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
GL_EXT_EGL_image_storage, GL_EXT_texture_format_BGRA8888
''';
}
stdout += '''
Configurations:
bf lv colorbuffer dp st ms vis cav bi renderable supported
id sz l r g b a th cl ns b id eat nd gl es es2 vg surfaces
---------------------------------------------------------------------
0x01 32 0 10 10 10 2 0 0 0 0 0x00-- y y y win
''';
}
if (x11) {
stdout += '''
X11 platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL driver name: iris
''';
if (core) {
stdout += '''
OpenGL core profile vendor: Intel
OpenGL core profile renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
OpenGL core profile version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1
OpenGL core profile shading language version: 4.60
OpenGL core profile extensions:
GL_ARB_blend_func_extended, GL_EXT_framebuffer_blit
''';
}
if (es) {
stdout += '''
OpenGL ES profile vendor: Intel
OpenGL ES profile renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
GL_EXT_EGL_image_storage, GL_EXT_texture_format_BGRA8888
''';
}
stdout += '''
Configurations:
bf lv colorbuffer dp st ms vis cav bi renderable supported
id sz l r g b a th cl ns b id eat nd gl es es2 vg surfaces
---------------------------------------------------------------------
0x01 32 0 10 10 10 2 0 0 0 0 0x00-- y y y win
''';
}
return FakeCommand(command: const <String>['eglinfo'], stdout: stdout);
}
// A command that will failure when running 'eglinfo'.
FakeCommand _eglinfoMissingCommand() {
return const FakeCommand(command: <String>['eglinfo'], exitCode: 1);
}
// Commands that give some failures for the GTK library pkg-config queries.
List<FakeCommand> _gtkLibrariesMissingCommands() {
return <FakeCommand>[
@@ -100,6 +196,7 @@ void main() {
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
@@ -113,6 +210,14 @@ void main() {
ValidationMessage('cmake version 3.16.3'),
ValidationMessage('ninja version 1.10.0'),
ValidationMessage('pkg-config version 0.29'),
ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
ValidationMessage('OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1'),
ValidationMessage('OpenGL core shading language version: 4.60'),
ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
ValidationMessage('GL_EXT_framebuffer_blit: yes'),
ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
},
);
@@ -124,6 +229,7 @@ void main() {
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
@@ -138,6 +244,14 @@ void main() {
ValidationMessage('cmake version 3.16.3'),
ValidationMessage('ninja version 1.10.0'),
ValidationMessage('pkg-config version 0.29'),
ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
ValidationMessage('OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1'),
ValidationMessage('OpenGL core shading language version: 4.60'),
ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
ValidationMessage('GL_EXT_framebuffer_blit: yes'),
ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
});
@@ -148,6 +262,7 @@ void main() {
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
@@ -162,6 +277,14 @@ void main() {
ValidationMessage.error('cmake 3.10.0 or later is required.'),
ValidationMessage('ninja version 1.10.0'),
ValidationMessage('pkg-config version 0.29'),
ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
ValidationMessage('OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1'),
ValidationMessage('OpenGL core shading language version: 4.60'),
ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
ValidationMessage('GL_EXT_framebuffer_blit: yes'),
ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
});
@@ -172,6 +295,7 @@ void main() {
_ninjaPresentCommand('0.8.1'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
@@ -186,6 +310,14 @@ void main() {
ValidationMessage('ninja version 0.8.1'),
ValidationMessage.error('ninja 1.8.0 or later is required.'),
ValidationMessage('pkg-config version 0.29'),
ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
ValidationMessage('OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1'),
ValidationMessage('OpenGL core shading language version: 4.60'),
ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
ValidationMessage('GL_EXT_framebuffer_blit: yes'),
ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
});
@@ -196,6 +328,7 @@ void main() {
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.27.0'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
@@ -210,6 +343,14 @@ void main() {
ValidationMessage('ninja version 1.10.0'),
ValidationMessage('pkg-config version 0.27.0'),
ValidationMessage.error('pkg-config 0.29.0 or later is required.'),
ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
ValidationMessage('OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1'),
ValidationMessage('OpenGL core shading language version: 4.60'),
ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
ValidationMessage('GL_EXT_framebuffer_blit: yes'),
ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
});
@@ -244,6 +385,7 @@ void main() {
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
@@ -258,6 +400,16 @@ void main() {
ValidationMessage.error(userMessages.cmakeMissing),
const ValidationMessage('ninja version 1.10.0'),
const ValidationMessage('pkg-config version 0.29'),
const ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage(
'OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1',
),
const ValidationMessage('OpenGL core shading language version: 4.60'),
const ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
const ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
const ValidationMessage('GL_EXT_framebuffer_blit: yes'),
const ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
});
@@ -268,6 +420,7 @@ void main() {
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
@@ -282,6 +435,16 @@ void main() {
ValidationMessage.error(userMessages.cmakeMissing),
const ValidationMessage('ninja version 1.10.0'),
const ValidationMessage('pkg-config version 0.29'),
const ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage(
'OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1',
),
const ValidationMessage('OpenGL core shading language version: 4.60'),
const ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
const ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
const ValidationMessage('GL_EXT_framebuffer_blit: yes'),
const ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
});
@@ -292,6 +455,7 @@ void main() {
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
@@ -306,6 +470,16 @@ void main() {
const ValidationMessage('cmake version 3.16.3'),
const ValidationMessage('ninja version 1.10.0'),
const ValidationMessage('pkg-config version 0.29'),
const ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage(
'OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1',
),
const ValidationMessage('OpenGL core shading language version: 4.60'),
const ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
const ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
const ValidationMessage('GL_EXT_framebuffer_blit: yes'),
const ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
});
@@ -316,6 +490,7 @@ void main() {
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
@@ -330,6 +505,16 @@ void main() {
const ValidationMessage('cmake version 3.16.3'),
const ValidationMessage('ninja version 1.10.0'),
const ValidationMessage('pkg-config version 0.29'),
const ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage(
'OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1',
),
const ValidationMessage('OpenGL core shading language version: 4.60'),
const ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
const ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
const ValidationMessage('GL_EXT_framebuffer_blit: yes'),
const ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
});
@@ -340,6 +525,7 @@ void main() {
_missingBinaryCommand('ninja'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
@@ -354,6 +540,16 @@ void main() {
const ValidationMessage('cmake version 3.16.3'),
ValidationMessage.error(userMessages.ninjaMissing),
const ValidationMessage('pkg-config version 0.29'),
const ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage(
'OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1',
),
const ValidationMessage('OpenGL core shading language version: 4.60'),
const ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
const ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
const ValidationMessage('GL_EXT_framebuffer_blit: yes'),
const ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
});
@@ -364,6 +560,7 @@ void main() {
_ninjaPresentCommand('bogus'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
@@ -378,6 +575,16 @@ void main() {
const ValidationMessage('cmake version 3.16.3'),
ValidationMessage.error(userMessages.ninjaMissing),
const ValidationMessage('pkg-config version 0.29'),
const ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage(
'OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1',
),
const ValidationMessage('OpenGL core shading language version: 4.60'),
const ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
const ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
const ValidationMessage('GL_EXT_framebuffer_blit: yes'),
const ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
});
@@ -388,6 +595,7 @@ void main() {
_ninjaPresentCommand('1.10.0'),
_missingBinaryCommand('pkg-config'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
@@ -412,6 +620,7 @@ void main() {
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('bogus'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
@@ -436,6 +645,7 @@ void main() {
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesMissingCommands(),
_eglinfoPresentCommand(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
@@ -451,6 +661,16 @@ void main() {
const ValidationMessage('ninja version 1.10.0'),
const ValidationMessage('pkg-config version 0.29'),
ValidationMessage.error(userMessages.gtkLibrariesMissing),
const ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage(
'OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1',
),
const ValidationMessage('OpenGL core shading language version: 4.60'),
const ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
const ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
const ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
const ValidationMessage('GL_EXT_framebuffer_blit: yes'),
const ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
});
@@ -461,6 +681,7 @@ void main() {
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
@@ -470,4 +691,156 @@ void main() {
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.missing);
});
testWithoutContext('Warning when eglinfo not available', () async {
final UserMessages userMessages = UserMessages();
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoMissingCommand(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: userMessages,
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.success);
expect(result.messages, <ValidationMessage>[
const ValidationMessage('clang version 4.0.1-6+build1'),
const ValidationMessage('cmake version 3.16.3'),
const ValidationMessage('ninja version 1.10.0'),
const ValidationMessage('pkg-config version 0.29'),
ValidationMessage.hint(userMessages.eglinfoMissing),
]);
});
testWithoutContext('Wayland only platform', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(x11: false),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: UserMessages(),
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.success);
expect(result.messages, const <ValidationMessage>[
ValidationMessage('clang version 4.0.1-6+build1'),
ValidationMessage('cmake version 3.16.3'),
ValidationMessage('ninja version 1.10.0'),
ValidationMessage('pkg-config version 0.29'),
ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2) (Wayland)'),
ValidationMessage(
'OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1 (Wayland)',
),
ValidationMessage('OpenGL core shading language version: 4.60 (Wayland)'),
ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2) (Wayland)'),
ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1 (Wayland)'),
ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20 (Wayland)'),
ValidationMessage('GL_EXT_framebuffer_blit: yes (Wayland)'),
ValidationMessage('GL_EXT_texture_format_BGRA8888: yes (Wayland)'),
]);
});
testWithoutContext('X11 only platform', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(wayland: false),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: UserMessages(),
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.success);
expect(result.messages, const <ValidationMessage>[
ValidationMessage('clang version 4.0.1-6+build1'),
ValidationMessage('cmake version 3.16.3'),
ValidationMessage('ninja version 1.10.0'),
ValidationMessage('pkg-config version 0.29'),
ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2) (X11)'),
ValidationMessage(
'OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1 (X11)',
),
ValidationMessage('OpenGL core shading language version: 4.60 (X11)'),
ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2) (X11)'),
ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1 (X11)'),
ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20 (X11)'),
ValidationMessage('GL_EXT_framebuffer_blit: yes (X11)'),
ValidationMessage('GL_EXT_texture_format_BGRA8888: yes (X11)'),
]);
});
testWithoutContext('No OpenGL ES', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(es: false),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: UserMessages(),
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.success);
expect(result.messages, const <ValidationMessage>[
ValidationMessage('clang version 4.0.1-6+build1'),
ValidationMessage('cmake version 3.16.3'),
ValidationMessage('ninja version 1.10.0'),
ValidationMessage('pkg-config version 0.29'),
ValidationMessage('OpenGL core renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
ValidationMessage('OpenGL core version: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.10.1'),
ValidationMessage('OpenGL core shading language version: 4.60'),
ValidationMessage('GL_EXT_framebuffer_blit: yes'),
ValidationMessage('GL_EXT_texture_format_BGRA8888: no'),
]);
});
testWithoutContext('No OpenGL core', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
_eglinfoPresentCommand(core: false),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: UserMessages(),
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.success);
expect(result.messages, const <ValidationMessage>[
ValidationMessage('clang version 4.0.1-6+build1'),
ValidationMessage('cmake version 3.16.3'),
ValidationMessage('ninja version 1.10.0'),
ValidationMessage('pkg-config version 0.29'),
ValidationMessage('OpenGL ES renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)'),
ValidationMessage('OpenGL ES version: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.10.1'),
ValidationMessage('OpenGL ES shading language version: OpenGL ES GLSL ES 3.20'),
ValidationMessage('GL_EXT_framebuffer_blit: no'),
ValidationMessage('GL_EXT_texture_format_BGRA8888: yes'),
]);
});
}