Skip to content

Browser tests cannot run from a Windows checkout #478

Description

@thcp

The problem

The Playwright suite cannot be run from a Windows checkout. npx playwright test starts its web server with bash tests/e2e/serve.sh, and bash fails on
every line of that file.

$ file tests/e2e/serve.sh
tests/e2e/serve.sh: Bourne-Again shell script, ASCII text executable, with CRLF line terminators

Cause

The file is stored LF in the index, but there is no .gitattributes, so a
checkout with core.autocrlf=true (the Windows default, and what git config --global core.autocrlf true sets during Git for Windows setup) converts it to
CRLF on the way to disk. bash treats the trailing CR as part of each command.

$ git ls-files --eol tests/e2e/serve.sh
i/lf    w/crlf  attr/                   tests/e2e/serve.sh

CI never sees this because it runs on Linux, where autocrlf is off.

Who it affects

Anyone developing StemDeck on Windows, which includes the primary desktop
target. The practical effect is that the browser tests get skipped locally and
only run after a push, or are assumed to pass.

Constraints

The fix has to survive a fresh clone rather than being repaired in one working
copy. Running dos2unix on the file fixes it until the next checkout.

Related, not the same problem

While confirming this, serve.sh did something worse on a GPU development box:
its uv run resynced the project environment, uninstalled seven packages, and
tried to replace a hand-installed torch 2.6.0+cu124 with the plain wheel. It
failed partway on a locked DLL and rolled back, so nothing was lost, but a
harness that can quietly rebuild a developer's CUDA environment is worth its own
issue and is not fixed by anything here.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions