Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ on:
branches:
- main

permissions:
contents: read

jobs:
e2e:
runs-on: ${{ matrix.os }}
name: Run
name: Run (${{ matrix.os }})
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
Expand All @@ -27,3 +30,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 curl 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)
R2H_E2E_NO_DEV=1 ./scripts/run-e2e.sh
2 changes: 1 addition & 1 deletion e2e/helpers/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
10 changes: 8 additions & 2 deletions scripts/run-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -91,8 +92,13 @@ echo ""

cd "$PROJECT_ROOT"

UV_RUN_CMD=(uv run)
if [[ "${R2H_E2E_NO_DEV:-0}" == "1" ]]; then
UV_RUN_CMD+=(--no-dev)
fi

if [[ "$PARALLEL" == "1" ]]; then
exec uv run pytest "$TEST_PATH" -v "${PYTEST_ARGS[@]+"${PYTEST_ARGS[@]}"}"
exec "${UV_RUN_CMD[@]}" 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_CMD[@]}" pytest "$TEST_PATH" -v -n "$PARALLEL" --dist loadscope "${PYTEST_ARGS[@]+"${PYTEST_ARGS[@]}"}"
fi
3 changes: 1 addition & 2 deletions tools/devlab/devlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading