Skip to content

cleanup logging (#109) #195

cleanup logging (#109)

cleanup logging (#109) #195

Workflow file for this run

name: HITL
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.ref == 'refs/heads/master' && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
test:
name: Test connection and CLI
runs-on: [self-hosted, Linux, HITL]
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/prepare-cli
- name: connect to qdl (upload loader)
run: qdl.js getactiveslot
- name: connect to qdl (existing loader)
run: qdl.js getactiveslot
- name: qdl.js reset
run: |
qdl.js reset
sleep 1
qdl.js getactiveslot
test-repairgpt:
name: Test GPT repair functionality
runs-on: [self-hosted, Linux, HITL]
needs: test
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/prepare-cli
- name: download gpt images
run: |
END=5
for i in $(seq 0 $END); do
url=$(curl https://raw.githubusercontent.com/commaai/openpilot/master/system/hardware/tici/all-partitions.json | jq -r ".[] | select(.name == \"gpt_main_$i\") | .url")
curl -L $url | unxz > gpt_main_$i.img
done
- run: |
END=5
for i in $(seq 0 $END); do
qdl.js repairgpt $i ./gpt_main_$i.img
done
- run: qdl.js printgpt
test-activeslot:
name: Test getting and setting active slot
runs-on: [self-hosted, Linux, HITL]
needs: test-repairgpt
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/prepare-cli
- run: qdl.js setactiveslot a
- name: verify slot is a
run: |
NEW_SLOT=$(qdl.js getactiveslot)
echo "New active slot: $NEW_SLOT"
if [ "$NEW_SLOT" != "a" ]; then
echo "ERROR: Slot did not change!"
exit 1
fi
env:
QDL_LOG_LEVEL: error
- run: qdl.js printgpt
- run: qdl.js setactiveslot b
- name: verify slot is b
run: |
NEW_SLOT=$(qdl.js getactiveslot)
echo "New active slot: $NEW_SLOT"
if [ "$NEW_SLOT" != "b" ]; then
echo "ERROR: Slot did not change!"
exit 1
fi
env:
QDL_LOG_LEVEL: error
- run: qdl.js printgpt
test-flash:
name: Test flashing images
runs-on: [self-hosted, Linux, HITL]
needs: test-activeslot
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/prepare-cli
- name: download boot image
run: |
url=$(curl https://raw.githubusercontent.com/commaai/openpilot/master/system/hardware/tici/agnos.json | jq -r ".[] | select(.name == \"boot\") | .url")
curl -L $url | unxz > boot.img
- run: qdl.js printgpt
- run: qdl.js erase boot_a
- run: qdl.js printgpt
- run: qdl.js flash boot_a ./boot.img
- run: qdl.js printgpt