mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-27 16:43:59 +08:00
Repair wired Android Auto CI prerequisites
Install the pinned H.264 test encoder in the unit-test environment and align the UI contract test with existing wired support. Preserve runtime code, timeouts, and ownership gates.
This commit is contained in:
@@ -186,6 +186,11 @@ jobs:
|
||||
- name: Build openpilot
|
||||
id: build
|
||||
run: scons
|
||||
- name: Provide H.264 encoder for Android Auto integration tests
|
||||
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
|
||||
run: |
|
||||
uv pip install --python .venv/bin/python --only-binary av av==19.0.1
|
||||
.venv/bin/python -c "import av; assert 'libx264' in av.codecs_available"
|
||||
- name: Run unit tests
|
||||
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
|
||||
timeout-minutes: ${{ contains(runner.name, 'nsc') && 2 || 20 }}
|
||||
|
||||
@@ -18,7 +18,8 @@ assert.equal(validPromptInput({ kind: "passkey" }, "1234567"), false)
|
||||
assert.equal(validPromptInput(prompt, ""), true)
|
||||
assert.match(AndroidAutoPage.template, /Check that this code matches your car/)
|
||||
assert.match(AndroidAutoPage.template, /Cancel Search \/ Pairing/)
|
||||
assert.match(AndroidAutoPage.template, /Wired USB setup is unavailable/)
|
||||
assert.match(AndroidAutoPage.template, /:row="wiredRow"[^>]*:disabled="wiredDisabled"/)
|
||||
assert.match(AndroidAutoPage.template, /A direct USB cable from the comma to the car is supported as Wired USB Connection/)
|
||||
assert.doesNotMatch(AndroidAutoPage.template, /v-html|autoaccept/i)
|
||||
const app = readFileSync(new URL("../web/js/app.js", import.meta.url), "utf8")
|
||||
assert.match(app, /AndroidAutoPage v-else-if="route\.path === '\/android-auto'"/)
|
||||
@@ -159,6 +160,24 @@ function page(selectedSetup = setup) {
|
||||
for (const [key, method] of Object.entries(AndroidAutoPage.methods)) vm[key] = method.bind(vm)
|
||||
return vm
|
||||
}
|
||||
// Wired setup is available, while the existing parked/session/ownership gates remain enforced.
|
||||
const wiredSetup = page()
|
||||
wiredSetup.runtime = { connection: "wireless", running: false }
|
||||
assert.equal(wiredSetup.wiredDisabled, false)
|
||||
for (const field of ["enabled", "parked"]) {
|
||||
const blocked = page({ ...setup, [field]: false })
|
||||
assert.equal(blocked.wiredDisabled, true, field)
|
||||
}
|
||||
wiredSetup.pairing = { active: true }
|
||||
assert.equal(wiredSetup.wiredDisabled, true, "pairing owns the connection")
|
||||
wiredSetup.pairing = null
|
||||
wiredSetup.runtime.running = true
|
||||
assert.equal(wiredSetup.wiredDisabled, true, "a running session cannot change connection")
|
||||
wiredSetup.runtime = { connection: "wireless", running: false, wired_blocked: "USB is busy" }
|
||||
assert.equal(wiredSetup.wiredDisabled, true, "another USB owner blocks enabling wired mode")
|
||||
wiredSetup.runtime.connection = "wired"
|
||||
assert.equal(wiredSetup.wiredDisabled, false, "the existing wired connection can still be disabled")
|
||||
|
||||
const uploadPage = page({ ...setup, enabled: false })
|
||||
const uploadCalls = []
|
||||
uploadPage.feed = {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "6898cb0e30c38f6155bc57606d14421592f78684e956514af89a271c302f4a0d", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "761e6890c245123ed631eac27a1f0562d201ea7145bb5318418bf55b0b976143", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user