Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoantoniocardoso committed May 9, 2024
1 parent c3952e1 commit d91c04c
Show file tree
Hide file tree
Showing 12 changed files with 1,925 additions and 1,320 deletions.
59 changes: 40 additions & 19 deletions .github/workflows/test_webrtc_leak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,53 @@ on: [push, pull_request]

jobs:
test-webrtc-thread-leak:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Chromedriver
uses: nanasess/setup-chromedriver@v2

- name: Install libraries
- name: Install apt dependencies
run: |
sudo apt install -y --no-install-recommends ca-certificates gnupg
sudo apt update
sudo apt install -y chromium-chromedriver
sudo apt install -y libunwind-dev
sudo apt install -y --no-install-recommends libclang-dev libssl-dev pkg-config libmount-dev libsepol-dev libselinux1-dev libglib2.0-dev libgudev-1.0-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-bad1.0-dev libgstrtspserver-1.0-dev \
libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgstreamer-plugins-bad1.0-0 \
gstreamer1.0-x gstreamer1.0-nice gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
gst-inspect-1.0 # Update database
chromedriver --port=6666& # Start webdriver for test
apt install -y --no-install-recommends \
libgstreamer1.0-0 \
libgstreamer-plugins-base1.0-0 \
libgstreamer-plugins-bad1.0-0 \
libgstrtspserver-1.0-0 \
gstreamer1.0-x \
gstreamer1.0-nice \
gstreamer1.0-libav \
gstreamer1.0-plugins-ugly \
wget \
ca-certificates \
gnupg \
htop
- name: Install openssl.so.1.1
# Note: if the link breaks, find it here: https://packages.ubuntu.com/focal/amd64/libssl1.1/download
run: |
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb -O /tmp/openssl.deb
sudo dpkg -i /tmp/openssl.deb
- name: Install google chrome and chromedriver from Google
# Get the json API from https://github.com/GoogleChromeLabs/chrome-for-testing?tab=readme-ov-file#json-api-endpoints
run: |
sudo apt install -y --no-install-recommends jq unzip
wget --no-check-certificate https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json -O /tmp/downloads.json
chrome_url=$(jq -r '."channels"."Stable"."downloads"."chrome"[] | select(."platform" == "linux64") | ."url"' /tmp/downloads.json)
wget --no-check-certificate $chrome_url -O /tmp/chrome.zip
unzip /tmp/chrome.zip -d /tmp/
mkdir -p /opt/google
mv -f /tmp/chrome-linux64 /opt/google/chrome
ln -s /opt/google/chrome/chrome /usr/bin/chrome
chromedriver_url=$(jq -r '."channels"."Stable"."downloads"."chromedriver"[] | select(."platform" == "linux64") | ."url"' /tmp/downloads.json)
wget --no-check-certificate $chromedriver_url -O /tmp/chromedriver.zip
unzip /tmp/chromedriver.zip -d /tmp/
mv -f /tmp/chromedriver-linux64 /opt/google/chromedriver
ln -s /opt/google/chromedriver/chromedriver /usr/bin/chromedriver
- name: Run test
run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
cargo build
RUST_BACKTRACE=1 timeout 300 cargo run --verbose -- \
--mavlink udpin:0.0.0.0:6666 --verbose --default-settings WebRTCTest --enable-thread-counter --enable-webrtc-task-test 6666 || echo "Test failed" && exit 1
--mavlink udpin:0.0.0.0:6666 --verbose --default-settings WebRTCTest --enable-webrtc-task-test 6666 || echo "Test failed" && exit 1
Loading

0 comments on commit d91c04c

Please sign in to comment.