diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 20e2ade..8632676 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,6 +20,15 @@ jobs: - name: Run tests run: cargo test --verbose + + test-linux-ipv4: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build + run: docker build -t sacn-tests -f docker-linux/Dockerfile . + - name: Run tests + run: docker run --cap-add=NET_ADMIN sacn-tests test-windows: runs-on: windows-latest diff --git a/docker-linux/Dockerfile b/docker-linux/Dockerfile index 20d3d0d..58742dd 100644 --- a/docker-linux/Dockerfile +++ b/docker-linux/Dockerfile @@ -22,5 +22,4 @@ RUN chmod +x run_tests.sh # RUN cargo test # default command runs your multicast suite; tweak if needed -CMD ["./run_tests.sh"] - \ No newline at end of file +CMD ["./run_tests.sh"] \ No newline at end of file diff --git a/docker-linux/run_tests.sh b/docker-linux/run_tests.sh index 8154140..532e646 100644 --- a/docker-linux/run_tests.sh +++ b/docker-linux/run_tests.sh @@ -22,4 +22,4 @@ ip a show dev lo # sysctl -p cargo test -cargo test ipv4 -- --ignored --nocapture +cargo test --test ipv4_tests -- --ignored --nocapture --test-threads=1 diff --git a/tests/ipv4_tests.rs b/tests/ipv4_tests.rs index 3351b0f..0f6face 100644 --- a/tests/ipv4_tests.rs +++ b/tests/ipv4_tests.rs @@ -37,7 +37,6 @@ use socket2::{Socket, Domain, Type}; /// For some tests to work multiple instances of the protocol must be on the same network with the same port for example to test multiple simultaneous receivers, this means multiple IP's are needed. /// This is achieved by assigning multiple static IP's to the test machine and theses IP's are specified below. /// Theses must be changed depending on the network that the test machine is on. -// pub const TEST_NETWORK_INTERFACE_IPV4: [&'static str; 3] = ["192.168.0.6", "192.168.0.7", "192.168.0.8"]; pub const TEST_NETWORK_INTERFACE_IPV4: [&'static str; 3] = ["192.168.0.6", "192.168.0.7", "192.168.0.8"];