-
Notifications
You must be signed in to change notification settings - Fork 100
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
Try testing with Scapy version updated to 2.5.0 #212
Changes from all commits
58fca24
ff3345b
f77941f
e55f231
4dc21c7
f4838fc
7762e30
7602f72
15ecb61
7924ffa
997d4f5
df9c770
78a6d6b
affca33
5755a87
0413aa4
4ebea59
462c175
cbdab40
cdfadb7
e73fa13
c557643
cce5f72
e6b4fd3
75bfc78
89d920c
c138cca
c8ab50f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,41 +11,53 @@ on: | |
|
||
jobs: | ||
verify-python: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, ubuntu-24.04] | ||
scapy_version: [2.5.0, 2.6.1] | ||
# Don't abort other runs when one of them fails, to ease debugging. | ||
fail-fast: false | ||
|
||
name: Python code verification (src) | ||
runs-on: ubuntu-22.04 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: | | ||
make set-dev | ||
python -m pip install scapy==2.4.5 | ||
python -m pip install scapy==${{ matrix.scapy_version }} | ||
- name: Verify code (python w/black) | ||
run: | | ||
make format-check | ||
- name: Run pytests (utests/tests) | ||
run: | | ||
make test | ||
test: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, ubuntu-24.04] | ||
scapy_version: [2.5.0, 2.6.1] | ||
# Don't abort other runs when one of them fails, to ease debugging. | ||
fail-fast: false | ||
|
||
name: run ptf unit tests | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Dependencies | ||
run: | | ||
sudo apt-get install cmake libffi-dev ethtool python3-dev | ||
# Install the latest pip version (not python3-pip) as older versions | ||
# seem to have issues when installing from source. | ||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | ||
sudo python3 get-pip.py | ||
sudo python3 -m pip install --upgrade setuptools nose2 scapy wheel | ||
python3 -m pip install --upgrade setuptools nose2 wheel | ||
python -m pip install scapy==${{ matrix.scapy_version }} | ||
|
||
bash CI/install-nanomsg.sh | ||
sudo ldconfig | ||
bash CI/install-nnpy.sh | ||
|
||
- name: Install | ||
run: | | ||
sudo python3 -m pip install . | ||
python3 -m pip install . | ||
ptf --version | ||
|
||
- name: Before_script | ||
|
@@ -54,6 +66,6 @@ jobs: | |
|
||
- name: Script | ||
run: | | ||
pip --verbose list | ||
python3 CI/check-nnpy.py | ||
./CI/run_tests.sh | ||
sudo python3 /usr/local/bin/nose2 utests.tests.test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI for reviewers - these tests are still run, but I moved the command that runs them into the |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ | |
THIS_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
source $THIS_DIR/common.sh | ||
|
||
set -x | ||
cmake --version | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the motivation for this output? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. debugging CI script behavior. |
||
|
||
# nanomsg is very confusing in how it manages SOVERSION vs VERSION, but this | ||
# should be okay... (5.0.0 is the SOVERSION) | ||
check_lib libnanomsg libnanomsg.so.5.0.0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
sudo python ptf_nn/ptf_nn_agent.py \ | ||
set -x | ||
|
||
sudo -E PATH=${PATH} python3 ptf_nn/ptf_nn_agent.py \ | ||
--device-socket 0@tcp://127.0.0.1:10001 -i 0-1@veth0 \ | ||
&>/dev/null & | ||
& | ||
|
||
sleep 5 | ||
|
||
sudo python ptf_nn/ptf_nn_agent.py \ | ||
sudo -E PATH=${PATH} python3 ptf_nn/ptf_nn_agent.py \ | ||
--device-socket 1@tcp://127.0.0.1:10002 -i 1-1@veth3 \ | ||
&>/dev/null & | ||
& | ||
|
||
sleep 5 | ||
|
||
sudo python ptf_nn/ptf_nn_test_bridge.py -ifrom veth1 -ito veth2 \ | ||
&>/dev/null & | ||
sudo -E PATH=${PATH} python3 ptf_nn/ptf_nn_test_bridge.py -ifrom veth1 -ito veth2 \ | ||
& | ||
|
||
sleep 5 | ||
|
||
sudo ptf --test-dir ptf_nn/ptf_nn_test \ | ||
sudo -E PATH=${PATH} `which ptf` --test-dir ptf_nn/ptf_nn_test \ | ||
--device-socket 0-{0-64}@tcp://127.0.0.1:10001 \ | ||
--device-socket 1-{0-64}@tcp://127.0.0.1:10002 \ | ||
--platform nn | ||
|
||
sudo -E PATH=${PATH} python3 `which nose2` utests.tests.test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call this linting or static analysis. Minor comment.
I updated the CI to require these tests now.