From 00e37e380f6d1f9e12e48297a0bdc7b957588d43 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 1 Jul 2026 16:50:34 +0000 Subject: [PATCH 1/3] ci(e2e): add FreeBSD workflow coverage Co-authored-by: Stackie Jia --- .github/workflows/e2e-tests.yaml | 22 +++++++++++++++++++++- e2e/helpers/constants.py | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml index a02586bd..9cd54f08 100644 --- a/.github/workflows/e2e-tests.yaml +++ b/.github/workflows/e2e-tests.yaml @@ -11,7 +11,7 @@ on: jobs: e2e: runs-on: ${{ matrix.os }} - name: Run + name: Run (${{ matrix.os }}) strategy: matrix: os: [ubuntu-latest, macos-latest] @@ -27,3 +27,23 @@ jobs: - name: Run E2E tests run: ./scripts/run-e2e.sh + + e2e-freebsd: + runs-on: ubuntu-latest + name: Run (freebsd) + steps: + - uses: actions/checkout@v6 + + - name: Run E2E tests in FreeBSD + uses: vmactions/freebsd-vm@v1 + with: + usesh: true + copyback: false + prepare: | + pkg install -y bash cmake python314 uv + run: | + export UV_PYTHON=/usr/local/bin/python3.14 + export UV_PYTHON_DOWNLOADS=never + cmake -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_AGGRESSIVE_OPT=ON + cmake --build build -j$(sysctl -n hw.ncpu) + ./scripts/run-e2e.sh diff --git a/e2e/helpers/constants.py b/e2e/helpers/constants.py index b9853f30..7dc7ec36 100644 --- a/e2e/helpers/constants.py +++ b/e2e/helpers/constants.py @@ -9,5 +9,5 @@ BINARY_PATH = PROJECT_ROOT / "build" / "rtp2httpd" FIXTURES_DIR = PROJECT_ROOT / "tools" / "fixtures" -LOOPBACK_IF = "lo0" if sys.platform == "darwin" else "lo" +LOOPBACK_IF = "lo0" if sys.platform == "darwin" or sys.platform.startswith("freebsd") else "lo" MCAST_ADDR = "239.255.0.1" From 0df8cae5ae0bf2117d4d0141f267c2dd4d6e8b53 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 1 Jul 2026 16:59:35 +0000 Subject: [PATCH 2/3] ci(e2e): fix FreeBSD e2e dependencies Co-authored-by: Stackie Jia --- .github/workflows/e2e-tests.yaml | 5 ++++- scripts/run-e2e.sh | 10 ++++++++-- tools/devlab/devlab.py | 3 +-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml index 9cd54f08..fe7a1bba 100644 --- a/.github/workflows/e2e-tests.yaml +++ b/.github/workflows/e2e-tests.yaml @@ -8,6 +8,9 @@ on: branches: - main +permissions: + contents: read + jobs: e2e: runs-on: ${{ matrix.os }} @@ -46,4 +49,4 @@ jobs: export UV_PYTHON_DOWNLOADS=never cmake -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_AGGRESSIVE_OPT=ON cmake --build build -j$(sysctl -n hw.ncpu) - ./scripts/run-e2e.sh + R2H_E2E_NO_DEV=1 ./scripts/run-e2e.sh diff --git a/scripts/run-e2e.sh b/scripts/run-e2e.sh index 35c4a34e..0e94cf8c 100755 --- a/scripts/run-e2e.sh +++ b/scripts/run-e2e.sh @@ -11,6 +11,7 @@ # ./scripts/run-e2e.sh -m "not multicast"# Skip multicast tests # ./scripts/run-e2e.sh -x # Stop on first failure # ./scripts/run-e2e.sh --co # Collect & list tests (dry run) +# R2H_E2E_NO_DEV=1 ./scripts/run-e2e.sh # Skip dependency-group dev tools # set -euo pipefail @@ -91,8 +92,13 @@ echo "" cd "$PROJECT_ROOT" +UV_RUN_ARGS=() +if [[ "${R2H_E2E_NO_DEV:-0}" == "1" ]]; then + UV_RUN_ARGS+=(--no-dev) +fi + if [[ "$PARALLEL" == "1" ]]; then - exec uv run pytest "$TEST_PATH" -v "${PYTEST_ARGS[@]+"${PYTEST_ARGS[@]}"}" + exec uv run "${UV_RUN_ARGS[@]}" pytest "$TEST_PATH" -v "${PYTEST_ARGS[@]+"${PYTEST_ARGS[@]}"}" else - exec uv run pytest "$TEST_PATH" -v -n "$PARALLEL" --dist loadscope "${PYTEST_ARGS[@]+"${PYTEST_ARGS[@]}"}" + exec uv run "${UV_RUN_ARGS[@]}" pytest "$TEST_PATH" -v -n "$PARALLEL" --dist loadscope "${PYTEST_ARGS[@]+"${PYTEST_ARGS[@]}"}" fi diff --git a/tools/devlab/devlab.py b/tools/devlab/devlab.py index 875f9b5d..04c7c594 100644 --- a/tools/devlab/devlab.py +++ b/tools/devlab/devlab.py @@ -756,8 +756,7 @@ def build_services_m3u(http_hostport: str, rtsp_hostport: str, mcast_channels: l # mpegts-over-RTSP live + RTSP TS catchup window: covers mpegts 回看 src = f"rtsp://{rtsp_hostport}/catchup/{prof}?{tpl}" extinf = ( - f'#EXTINF:-1 group-title="mpegts (RTSP)" catchup="default" ' - f'catchup-source="{src}",mpegts (RTSP) ({prof})' + f'#EXTINF:-1 group-title="mpegts (RTSP)" catchup="default" catchup-source="{src}",mpegts (RTSP) ({prof})' ) lines += [ extinf, From 4f6cccb56845b746ffc27f34d4f4c789bf4b7fec Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 1 Jul 2026 17:03:06 +0000 Subject: [PATCH 3/3] ci(e2e): fix cross-platform runner issues Co-authored-by: Stackie Jia --- .github/workflows/e2e-tests.yaml | 2 +- scripts/run-e2e.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml index fe7a1bba..6f15f343 100644 --- a/.github/workflows/e2e-tests.yaml +++ b/.github/workflows/e2e-tests.yaml @@ -43,7 +43,7 @@ jobs: usesh: true copyback: false prepare: | - pkg install -y bash cmake python314 uv + pkg install -y bash cmake curl python314 uv run: | export UV_PYTHON=/usr/local/bin/python3.14 export UV_PYTHON_DOWNLOADS=never diff --git a/scripts/run-e2e.sh b/scripts/run-e2e.sh index 0e94cf8c..346190b0 100755 --- a/scripts/run-e2e.sh +++ b/scripts/run-e2e.sh @@ -92,13 +92,13 @@ echo "" cd "$PROJECT_ROOT" -UV_RUN_ARGS=() +UV_RUN_CMD=(uv run) if [[ "${R2H_E2E_NO_DEV:-0}" == "1" ]]; then - UV_RUN_ARGS+=(--no-dev) + UV_RUN_CMD+=(--no-dev) fi if [[ "$PARALLEL" == "1" ]]; then - exec uv run "${UV_RUN_ARGS[@]}" pytest "$TEST_PATH" -v "${PYTEST_ARGS[@]+"${PYTEST_ARGS[@]}"}" + exec "${UV_RUN_CMD[@]}" pytest "$TEST_PATH" -v "${PYTEST_ARGS[@]+"${PYTEST_ARGS[@]}"}" else - exec uv run "${UV_RUN_ARGS[@]}" pytest "$TEST_PATH" -v -n "$PARALLEL" --dist loadscope "${PYTEST_ARGS[@]+"${PYTEST_ARGS[@]}"}" + exec "${UV_RUN_CMD[@]}" pytest "$TEST_PATH" -v -n "$PARALLEL" --dist loadscope "${PYTEST_ARGS[@]+"${PYTEST_ARGS[@]}"}" fi