Skip to content

flutter test --tags does not correctly parse boolean selectors #189193

Closed

Description

@ThomasDuffinMears

Steps to reproduce

"flutter help test" points to the test package (which flutter test proxies into) which mentions boolean selectors: https://pub.dev/packages/test#tagging-tests

These do not work, no matter how I've tried (different terminals, platforms, etc) as the tags are unwrapped and/or parsed before proxying to dart, which internally causes the tags to be executed as terminal commands.

  1. run flutter test --tags="(golden||ci)"
  • other permutations such as "golden||ci" have the same behaviour

Expected results

Tests only run if the test tag evaluates true for "golden" OR "ci"

Actual results

>$ flutter test -x='golden||ci'  

Resolving dependencies in [redacted]
# Redacted flutter pub get output...
Try `flutter pub outdated` for more information.
expected expression.

Usage: dart test [files or directories...]

-h, --help                            Show this usage information.
    --version                         Show the package:test version.
# Redacted dart help test output...
    --[no-]color                      Use terminal colors.
                                      (auto-detected by default)
# Note that the 2nd part of the boolean op is executed as a command! 
# What if your boolean syntax evaluated to something destructive?
'ci' is not recognized as an internal or external command,
operable program or batch file.

Code sample

N/A

Screenshots or Video

N/A

Logs

Exact same output as actual section

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.44.1, on Microsoft Windows [Version 10.0.26200.8655], locale en-GB) [547ms]
    • Flutter version 3.44.1 on channel stable at C:\Users\redacted\flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 924134a44c (6 weeks ago), 2026-05-29 12:13:22 -0400
    • Engine revision c416acfeb8
    • Dart version 3.12.1
    • DevTools version 2.57.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios,
      cli-animations, enable-native-assets, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging,
      enable-uiscene-migration

[√] Windows Version (Windows 11 or higher, 25H2, 2009) [2.1s]

[√] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [1,819ms]
    • Android SDK at C:\Users\redacted\AppData\Local\Android\sdk
    • Emulator version 36.3.10.0 (build_id 14472402) (CL:N/A)
    • Platform android-36, build-tools 36.1.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.8+-14196175-b1038.72)
    • All Android licenses accepted.

[√] Chrome - develop for the web [296ms]
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[!] Visual Studio - develop Windows apps (SQL Server Management Studio 21 21.6.17) [295ms]
    • Visual Studio at C:\Program Files\Microsoft SQL Server Management Studio 21\Release
    • SQL Server Management Studio 21 version 21.6.36603.0
    X The current Visual Studio installation is incomplete.
      Please use Visual Studio Installer to complete the installation or reinstall Visual Studio.

[√] Connected device (4 available) [353ms]
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 16 (API 36) (emulator)
    • Windows (desktop)            • windows       • windows-x64    • Microsoft Windows [Version 10.0.26200.8655]
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 150.0.7871.47
    • Edge (web)                   • edge          • web-javascript • Microsoft Edge 150.0.4078.48

[√] Network resources [309ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.

Activity

  1. changed the title [-]flutter test --tags does not support boolean selectors[/-] [+]flutter test --tags does not correctly parse boolean selectors[/+] on Jul 9, 2026
  2. suryaKommana2662 commented on Jul 10, 2026

    @suryaKommana2662
    Contributor

    @ThomasDuffinMears Thanks for the detailed report. I was able to reproduce the issue using the provided command. Running flutter test -x='golden||ci' in the terminal results in the following error:

    'ci' is not recognized as an internal or external command, operable program or batch file.

    Based on the reproduction, I'm routing this issue to theTeam-toolfor further investigation.

  3. added
    a: tests"flutter test", flutter_test, or one of our tests
    toolAffects the "flutter" command-line tool. See also t: labels.
    team-toolOwned by Flutter Tool team
    and removed
    in triagePresently being triaged by the triage team
    on Jul 10, 2026
  4. github-actions commented on Aug 19, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: tests"flutter test", flutter_test, or one of our teststeam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions