Skip to content

Fix brittle POSIX ManualCommand progress-line assertion in NativeCliInstallerTests #1996

Description

@hatayama

Summary

NativeCliInstallerTests.GetInstallCommand_RemoteBootstrapsEmitProgressLinesInStageOrder fails on current v3-beta even with no local changes. Production output is correct; the assertion is wrong.

Discovered while working on #1994 (launcher → dispatcher rename). Confirmed unrelated: the same failure reproduces on a clean origin/v3-beta tree with that PR's changes stashed. Left out of #1994 on purpose so the rename PR stayed a single concern.

Root cause

  • Packages/src/Editor/Infrastructure/CLI/NativeCliCommandBuilder.cs still emits echo 'Downloading installer script...' (and the verify/start lines) in the POSIX remote install script.
  • POSIX ManualCommand is wrapped via BuildLoginShellPosixInstallScriptCommand.
  • That wrap escapes inner single quotes through QuotePosixShellValue, so ManualCommand contains an escaped form such as echo '"'"'Downloading installer script...' rather than the bare echo 'Downloading installer script...'.
  • The test's IndexOf("echo 'Downloading installer script...'") therefore returns -1.
  • Windows passes because its ManualCommand is not login-shell-wrapped, so no quote escaping is inserted. That also explains why the Windows-only asserts around the same progress lines stay green.

Suggested fix

Fix the test, not production strings:

  1. Assert against the pre-wrap POSIX command string, or
  2. Escape the expected substring with the same QuotePosixShellValue rules before matching against ManualCommand.

Do not change the production echo / Write-Output progress text just to satisfy the brittle assertion. User-visible behavior is already correct; Unity progress labels consume those installer progress lines as intended.

Evidence

Activity

  1. hatayama commented on Jul 25, 2026

    @hatayama
    OwnerAuthor

    Fixed by #1999, merged into v3-beta as ca7e0db.

    The test now escapes the expected POSIX progress lines the same way BuildLoginShellPosixInstallScriptCommand does, so no production installer strings were changed. NativeCliInstallerTests passes 33/33.

    (GitHub did not auto-close this from the Fixes #1996 keyword because the PR merged into v3-beta, not the default branch.)

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions