Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcp: add netsim test #1026

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
10 changes: 9 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Test
jobs:
tests:
runs-on: ubuntu-22.04
needs: [check-msrv, test-msrv, test-stable, clippy]
needs: [check-msrv, test-msrv, test-stable, clippy, test-netsim]
steps:
- name: Done
run: exit 0
Expand Down Expand Up @@ -48,6 +48,14 @@ jobs:
- name: Run Tests nightly
run: ./ci.sh test nightly

test-netsim:
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Run network-simulation tests
run: ./ci.sh netsim

test-build-16bit:
runs-on: ubuntu-22.04
continue-on-error: true
Expand Down
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ getopts = "0.2"
rand = "0.8"
url = "2.0"
rstest = "0.17"
insta = "1.41.1"
rand_chacha = "0.3.1"

[features]
std = ["managed/std", "alloc"]
Expand Down Expand Up @@ -109,6 +111,8 @@ default = [

"_proto-fragmentation" = []

"_netsim" = []

# BEGIN AUTOGENERATED CONFIG FEATURES
# Generated by gen_config.py. DO NOT EDIT.
iface-max-addr-count-1 = []
Expand Down Expand Up @@ -267,6 +271,10 @@ rpl-parents-buffer-count-32 = []

# END AUTOGENERATED CONFIG FEATURES

[[test]]
name = "netsim"
required-features = ["_netsim"]

[[example]]
name = "packet2pcap"
path = "utils/packet2pcap.rs"
Expand Down
8 changes: 8 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ test() {
fi
}

netsim() {
cargo test --release --features _netsim netsim
}

check() {
local version=$1
rustup toolchain install $version
Expand Down Expand Up @@ -138,3 +142,7 @@ fi
if [[ $1 == "coverage" || $1 == "all" ]]; then
coverage
fi

if [[ $1 == "netsim" || $1 == "all" ]]; then
netsim
fi
Loading
Loading