diff options
| author | Ha Thach <[email protected]> | 2026-03-07 13:08:32 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-07 13:08:32 +0700 |
| commit | 5f69034631491cfd4dabe1a0051721f073a6f91c (patch) | |
| tree | 8168def729545304bebdd11da5341f789841b9b1 | |
| parent | 6c2c309316794ee580603db1b48422f9c648b1ad (diff) | |
| parent | 97297fe08bf0357b447f9c735612ce5f03146a31 (diff) | |
Merge pull request #3531 from hathach/hil-mtp
enable hil test for mtp
| -rw-r--r-- | .github/workflows/build.yml | 9 | ||||
| -rw-r--r-- | .github/workflows/claude-code-review.yml | 1 | ||||
| -rwxr-xr-x | test/hil/hil_test.py | 8 |
3 files changed, 14 insertions, 4 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d8b90f5a..ab1d3611f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -291,7 +291,14 @@ jobs: - name: Test on actual hardware run: | - python3 test/hil/hil_test.py ${{ env.HIL_JSON }} $SKIP_BOARDS + python3 test/hil/hil_test.py ${{ env.HIL_JSON }} $SKIP_BOARDS || \ + (if [ -f "${{ env.HIL_JSON }}.skip" ]; then + SKIP_BOARDS=$(cat "${{ env.HIL_JSON }}.skip") + echo "Re-running with SKIP_BOARDS=$SKIP_BOARDS" + python3 test/hil/hil_test.py ${{ env.HIL_JSON }} $SKIP_BOARDS + else + exit 1 + fi) # --------------------------------------- # Hardware in the loop (HIL) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 5ba2fe900..5d7efc115 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -6,6 +6,7 @@ on: jobs: claude-review: + if: false runs-on: ubuntu-latest permissions: contents: read diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py index f3cead7a3..7cffd2da8 100755 --- a/test/hil/hil_test.py +++ b/test/hil/hil_test.py @@ -153,14 +153,16 @@ def open_mtp_dev(uid): # MTP seems to take a while to enumerate timeout = 2 * ENUM_TIMEOUT while timeout > 0: - # run_cmd(f"gio mount -u mtp://TinyUsb_TinyUsb_Device_{uid}/") + # unmount gio/gvfs MTP mount which blocks libmtp from accessing the device + subprocess.run(f"gio mount -u mtp://TinyUsb_TinyUsb_Device_{uid}/", + shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) for raw in mtp.detect_devices(): mtp.device = mtp.mtp.LIBMTP_Open_Raw_Device(ctypes.byref(raw)) if mtp.device: sn = mtp.get_serialnumber().decode('utf-8') - #print(f'mtp serial = {sn}') if sn == uid: return mtp + mtp.disconnect() time.sleep(1) timeout -= 1 return None @@ -753,7 +755,7 @@ device_tests = [ 'device/cdc_msc_freertos', 'device/hid_boot_interface', 'device/printer_to_cdc', - # 'device/mtp' + 'device/mtp' ] dual_tests = [ |
