|
|
|
|
@@ -100,6 +100,7 @@ void main() {
|
|
|
|
|
_pkgConfigPresentCommand('0.29'),
|
|
|
|
|
..._gtkLibrariesPresentCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid'),
|
|
|
|
|
_libraryCheckCommand('liblzma'),
|
|
|
|
|
]);
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
processManager: processManager,
|
|
|
|
|
@@ -124,6 +125,7 @@ void main() {
|
|
|
|
|
_pkgConfigPresentCommand('0.29'),
|
|
|
|
|
..._gtkLibrariesPresentCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid'),
|
|
|
|
|
_libraryCheckCommand('liblzma'),
|
|
|
|
|
]);
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
processManager: processManager,
|
|
|
|
|
@@ -149,6 +151,7 @@ void main() {
|
|
|
|
|
_pkgConfigPresentCommand('0.29'),
|
|
|
|
|
..._gtkLibrariesPresentCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid'),
|
|
|
|
|
_libraryCheckCommand('liblzma'),
|
|
|
|
|
]);
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
processManager: processManager,
|
|
|
|
|
@@ -174,6 +177,7 @@ void main() {
|
|
|
|
|
_pkgConfigPresentCommand('0.29'),
|
|
|
|
|
..._gtkLibrariesPresentCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid'),
|
|
|
|
|
_libraryCheckCommand('liblzma'),
|
|
|
|
|
]);
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
processManager: processManager,
|
|
|
|
|
@@ -199,6 +203,7 @@ void main() {
|
|
|
|
|
_pkgConfigPresentCommand('0.27.0'),
|
|
|
|
|
..._gtkLibrariesPresentCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid'),
|
|
|
|
|
_libraryCheckCommand('liblzma'),
|
|
|
|
|
]);
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
processManager: processManager,
|
|
|
|
|
@@ -224,6 +229,7 @@ void main() {
|
|
|
|
|
_pkgConfigPresentCommand('0.29'),
|
|
|
|
|
..._gtkLibrariesPresentCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid'),
|
|
|
|
|
_libraryCheckCommand('liblzma'),
|
|
|
|
|
]);
|
|
|
|
|
final UserMessages userMessages = UserMessages();
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
@@ -249,6 +255,7 @@ void main() {
|
|
|
|
|
_pkgConfigPresentCommand('0.29'),
|
|
|
|
|
..._gtkLibrariesPresentCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid'),
|
|
|
|
|
_libraryCheckCommand('liblzma'),
|
|
|
|
|
]);
|
|
|
|
|
final UserMessages userMessages = UserMessages();
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
@@ -274,6 +281,7 @@ void main() {
|
|
|
|
|
_pkgConfigPresentCommand('0.29'),
|
|
|
|
|
..._gtkLibrariesPresentCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid'),
|
|
|
|
|
_libraryCheckCommand('liblzma'),
|
|
|
|
|
]);
|
|
|
|
|
final UserMessages userMessages = UserMessages();
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
@@ -299,6 +307,7 @@ void main() {
|
|
|
|
|
_missingBinaryCommand('pkg-config'),
|
|
|
|
|
..._gtkLibrariesPresentCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid'),
|
|
|
|
|
_libraryCheckCommand('liblzma'),
|
|
|
|
|
]);
|
|
|
|
|
final UserMessages userMessages = UserMessages();
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
@@ -324,6 +333,7 @@ void main() {
|
|
|
|
|
_pkgConfigPresentCommand('0.29'),
|
|
|
|
|
..._gtkLibrariesMissingCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid'),
|
|
|
|
|
_libraryCheckCommand('liblzma'),
|
|
|
|
|
]);
|
|
|
|
|
final UserMessages userMessages = UserMessages();
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
@@ -342,7 +352,7 @@ void main() {
|
|
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
testWithoutContext('Missing validation when libraries are not available', () async {
|
|
|
|
|
testWithoutContext('Missing validation when blkid is not available', () async {
|
|
|
|
|
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
|
_clangPresentCommand('4.0.1'),
|
|
|
|
|
_cmakePresentCommand('3.16.3'),
|
|
|
|
|
@@ -350,6 +360,7 @@ void main() {
|
|
|
|
|
_pkgConfigPresentCommand('0.29'),
|
|
|
|
|
..._gtkLibrariesPresentCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid', exists: false),
|
|
|
|
|
_libraryCheckCommand('liblzma'),
|
|
|
|
|
]);
|
|
|
|
|
final UserMessages userMessages = UserMessages();
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
@@ -368,6 +379,33 @@ void main() {
|
|
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
testWithoutContext('Missing validation when liblzma is not available', () async {
|
|
|
|
|
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
|
_clangPresentCommand('4.0.1'),
|
|
|
|
|
_cmakePresentCommand('3.16.3'),
|
|
|
|
|
_ninjaPresentCommand('1.10.0'),
|
|
|
|
|
_pkgConfigPresentCommand('0.29'),
|
|
|
|
|
..._gtkLibrariesPresentCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid'),
|
|
|
|
|
_libraryCheckCommand('liblzma', exists: false),
|
|
|
|
|
]);
|
|
|
|
|
final UserMessages userMessages = UserMessages();
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
processManager: processManager,
|
|
|
|
|
userMessages: userMessages,
|
|
|
|
|
);
|
|
|
|
|
final ValidationResult result = await linuxDoctorValidator.validate();
|
|
|
|
|
|
|
|
|
|
expect(result.type, ValidationType.missing);
|
|
|
|
|
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.error(userMessages.lzmaLibraryMissing),
|
|
|
|
|
]);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
testWithoutContext('Missing validation when multiple dependencies are not available', () async {
|
|
|
|
|
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
|
_missingBinaryCommand('clang++'),
|
|
|
|
|
@@ -376,6 +414,7 @@ void main() {
|
|
|
|
|
_pkgConfigPresentCommand('0.29'),
|
|
|
|
|
..._gtkLibrariesPresentCommands(),
|
|
|
|
|
_libraryCheckCommand('blkid'),
|
|
|
|
|
_libraryCheckCommand('liblzma'),
|
|
|
|
|
]);
|
|
|
|
|
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
|
|
|
|
|
processManager: processManager,
|
|
|
|
|
|