anchor.diff:          outputPreferences: OutputPreferences(),
         );
         logger.fatalWarnings = true;
  +      Process process;
         try {
           Cache.flutterRoot = tempDir.absolute.path;
           final Cache cache = Cache.test(
  
positive.code: import 'dart:io';
  
  Future<void> main(List<String> args) async {
  File file = File(args[0]);
  RandomAccessFile lock = file.openSync(mode: FileMode.write);
  lock.lockSync();
  await Future<void>.delayed(const Duration(milliseconds: 1000));
  exit(0);
  }
  ''');
          final Process process = await const LocalProcessManager().start(
            <String>[dart, script.absolute.path, cacheFile.absolute.path],
          );
          await Future<void>.delayed(const Duration(milliseconds: 500));
          await cache.lock();
          process.kill(io.ProcessSignal.sigkill);
        } finally {
          tryToDelete(tempDir);
          Cache.flutterRoot = oldRoot;
        }
  
negative.code:       expect(logger.warningText,
            equals('Waiting for another flutter command to release the startup lock...\n'));
        expect(logger.hadErrorOutput, isFalse);
        // Should still be false, since the particular "Waiting..." message above
        // aims to avoid triggering failure as a fatal warning.
        expect(logger.hadWarningOutput, isFalse);
      });
      testWithoutContext(
  