From 89c02b910d185a72bfdd9111f4361b0ebce52700 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 14 Jun 2026 23:22:18 +0200 Subject: [PATCH] test(toolchain): don't require pql installed on the host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'resolvePaths resolves pql from PATH' test asserted paths.pql isNotNull — true on the dev box (pql on PATH) but not on a GitHub runner, which doesn't ship pql. Assert the resolver's contract instead: pql is null when absent, or a path that really exists. Was the last red in the Linux unit job after the deflake. Co-Authored-By: Claude Opus 4.8 (1M context) --- test/kernel/src/toolchain_test.dart | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/kernel/src/toolchain_test.dart b/test/kernel/src/toolchain_test.dart index c9df9be2..e47b1b98 100644 --- a/test/kernel/src/toolchain_test.dart +++ b/test/kernel/src/toolchain_test.dart @@ -56,11 +56,15 @@ void main() { }); group('Toolchain.resolvePaths (static)', () { - test('returns a ResolvedPaths with pql resolved from PATH', () { + test('returns a ResolvedPaths; resolves pql from PATH when present', () { final paths = Toolchain.resolvePaths(); expect(paths, isA()); - // On this CI host pql is installed (per repo memory). - expect(paths.pql, isNotNull); + // pql is resolved from PATH only when it's installed on the host — it is on + // the dev box, but GitHub CI runners don't ship it. So accept null, or a + // path that really exists (the resolver must never invent one). + if (paths.pql != null) { + expect(File(paths.pql!).existsSync(), isTrue); + } }); test('git falls back to PATH when no install-dir dugite is found', () {