Skip to content

The Android driver passes its unit tests on Windows #1707

Open

Description

@V3RON

Part of #1693.

Scope

The Android driver's unit tests run on the Windows job and pass, and its files come off the list. Their fake SDKs now hold the names Windows has (emulator.exe, adb.exe, avdmanager.bat), so the driver's Windows SDK search, seeds and copies are checked on every PR. A Windows-only defect they show in the driver is fixed here.

If it goes wrong, an operator on Windows finds the SDK reported missing, or seeds and copies made in the wrong folder.

Technical spec

Commit 2df19f8.

Rows

  • Behaviours: B5
  • Interfaces: I4 (adds); I1, I3 (used)
  • Existing code: X9, X18, X19

Facts

# Fact Source
F1 At this commit, 19 files of src/drivers/android/ fail on Windows (310 tests): 256 with SdkMissingError (physical-handler*.test.ts, index*.test.ts), 39 with a mixed path such as /\home\simlock\.simlock\devices\android\sources\seed_two/simlock.avd (seeds*.test.ts, system-images.test.ts). With the fake reading both styles, 265 still fail. pnpm exec vitest run --project unit --project ui-dom --reporter=json on DesktopWindows (Windows 11 23H2), 2026-11-18, and the same with T1 F4's change
F2 The fixtures name the SDK's tools without extensions. src/drivers/android/test-sdk-fixtures.ts:250-255
F3 The SDK search runs through create with no platform, so the fixtures must follow the host. src/drivers/android/index.ts:879-885, src/drivers/android/sdk-paths.ts:65-70
F4 withWindowsExtension is a private function today; this task exports it (I4) and is its first caller outside the file. src/drivers/android/sdk-paths.ts:20-26

Modules touched

Searches: rg -ln "binaries|ANDROID_SDK_ROOT|WorkingDirectoryFilesystem|test-sdk-fixtures" src/drivers/android.

  • src/drivers/android/sdk-paths.ts (export I4, no other change), src/drivers/android/test-sdk-fixtures.ts, src/drivers/android/testing.ts, src/drivers/android/test-physical-handler.ts and the failing test files.
  • Product code in src/drivers/android/ only where a test shows a Windows-only defect.
  • src/test-support/windows-skipped.ts: this group's files removed.
  • A conflict in src/test-support/windows-skipped.ts with a sibling task of CI: run the tests on Windows #1693 (neighbouring lines removed) is resolved by keeping both sides' removals.

Rules in play

  • ADR 0087 §2, §5: fixtures follow the host through the driver's own path functions; product defects fixed here.
  • Android driver manual: every adb, emulator and avdmanager call still carries ANDROID_AVD_HOME and ANDROID_ADB_SERVER_PORT.

Tests

The seam is the Windows job (B1) running src/drivers/android/'s existing test files; model the SDK fixture on src/drivers/android/index-boot.test.ts and src/drivers/android/test-sdk-fixtures.ts.

  • B5: every file of the folder passes on the Windows job and none is on the list: fake SDKs built with emulatorPath, adbPath and I4; WorkingDirectoryFilesystem reads D:\x as absolute; expected paths built with node:path or in the / form as their source is; folders removed after their files close; any product fix pinned by its test

Done when

  • pnpm test:changed passes on the branch.
  • The PR's Unit tests (Windows) job passes, and no src/drivers/android/ file is left in src/test-support/windows-skipped.ts.

Out of scope

  • Other folders; running a real emulator on Windows.

Depends on

Written by an agent.

Activity

  1. added
    task:draftScope written; technical spec or its spec check missing.
    os:windowsRuns on, or affects, Windows hosts
    on Nov 18, 2026
  2. added
    task:readySpec checked. An agent may implement it once its Depends on allow.
    and removed
    task:draftScope written; technical spec or its spec check missing.
    on Nov 18, 2026
  3. self-assigned this
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

os:windowsRuns on, or affects, Windows hostsplatform:androidAndroid emulators or devicestask:readySpec checked. An agent may implement it once its Depends on allow.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions