Skip to content

Commit 32c566a

Browse files
Przemyslaw Bidastephanosio
Przemyslaw Bida
authored andcommitted
tests bsim/net: Separate bsim networking and bluetooth tests.
Splitting bsim tests workflows to be triggered separatley for networking (thread/802.15.4) and bluetooth tests. Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
1 parent 16ada3e commit 32c566a

File tree

5 files changed

+107
-11
lines changed

5 files changed

+107
-11
lines changed

.github/workflows/bsim-tests.yaml .github/workflows/bsim-tests-bluetooth.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
name: BabbleSim Tests
1+
name: BabbleSim BT Tests
22

33
on:
44
pull_request:
55
paths:
6-
- ".github/workflows/bsim-test*.yaml"
6+
- ".github/workflows/bsim-tests-bluetooth.yaml"
7+
- ".github/workflows/bsim-tests-publish.yaml"
78
- "west.yml"
89
- "subsys/bluetooth/**"
9-
- "tests/bsim/**"
10+
- "tests/bsim/bluetooth/**"
1011
- "samples/bluetooth/**"
11-
- "samples/net/sockets/echo_*/**"
1212
- "boards/posix/**"
1313
- "soc/posix/**"
1414
- "arch/posix/**"
@@ -18,7 +18,7 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
jobs:
21-
bsim-test:
21+
bsim-test-bluetooth:
2222
if: github.repository_owner == 'zephyrproject-rtos'
2323
runs-on: zephyr-runner-linux-x64-4xlarge
2424
container:
@@ -68,12 +68,12 @@ jobs:
6868
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
6969
west forall -c 'git reset --hard HEAD'
7070
71-
- name: Run Networking Tests with BSIM
71+
- name: Run Bluetooth Tests with BSIM
7272
run: |
7373
export ZEPHYR_BASE=${PWD}
74-
WORK_DIR=${ZEPHYR_BASE}/bsim_out tests/bsim/compile.sh
74+
WORK_DIR=${ZEPHYR_BASE}/bsim_out tests/bsim/bluetooth/compile.sh
7575
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_test_results_file} \
76-
SEARCH_PATH=tests/bsim/ tests/bsim/run_parallel.sh
76+
SEARCH_PATH=tests/bsim/bluetooth/ tests/bsim/run_parallel.sh
7777
7878
- name: Upload Test Results
7979
if: always()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: BabbleSim Networking Tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/bsim-tests-networking.yaml"
7+
- ".github/workflows/bsim-tests-publish.yaml"
8+
- "west.yml"
9+
- "tests/bsim/net/**"
10+
- "samples/net/sockets/echo_*/**"
11+
- "modules/openthread/**"
12+
- "subsys/net/l2/openthread/**"
13+
- "include/zephyr/net/openthread.h"
14+
- "boards/posix/**"
15+
- "soc/posix/**"
16+
- "arch/posix/**"
17+
- "drivers/ieee802154/**"
18+
- "include/zephyr/net/ieee802154*"
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
bsim-test-networking:
26+
if: github.repository_owner == 'zephyrproject-rtos'
27+
runs-on: zephyr-runner-linux-x64-4xlarge
28+
container:
29+
image: ghcr.io/zephyrproject-rtos/ci:v0.25.1
30+
options: '--entrypoint /bin/bash'
31+
volumes:
32+
- /repo-cache/zephyrproject:/github/cache/zephyrproject
33+
env:
34+
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
35+
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.0
36+
BSIM_OUT_PATH: /opt/bsim/
37+
BSIM_COMPONENTS_PATH: /opt/bsim/components
38+
EDTT_PATH: ../tools/edtt
39+
bsim_test_results_file: ./bsim_out/bsim_results.xml
40+
steps:
41+
- name: Apply container owner mismatch workaround
42+
run: |
43+
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
44+
# match the container user UID because of the way GitHub
45+
# Actions runner is implemented. Remove this workaround when
46+
# GitHub comes up with a fundamental fix for this problem.
47+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
48+
49+
- name: Clone cached Zephyr repository
50+
continue-on-error: true
51+
run: |
52+
git clone --shared /github/cache/zephyrproject/zephyr .
53+
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
54+
55+
- name: Checkout
56+
uses: actions/checkout@v3
57+
with:
58+
fetch-depth: 0
59+
60+
- name: Environment Setup
61+
env:
62+
BASE_REF: ${{ github.base_ref }}
63+
run: |
64+
git config --global user.email "bot@zephyrproject.org"
65+
git config --global user.name "Zephyr Bot"
66+
rm -fr ".git/rebase-apply"
67+
git rebase origin/${BASE_REF}
68+
git log --pretty=oneline | head -n 10
69+
west init -l . || true
70+
west config manifest.group-filter -- +ci
71+
west config --global update.narrow true
72+
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
73+
west forall -c 'git reset --hard HEAD'
74+
75+
- name: Run Networking Tests with BSIM
76+
run: |
77+
export ZEPHYR_BASE=${PWD}
78+
WORK_DIR=${ZEPHYR_BASE}/bsim_out tests/bsim/net/compile.sh
79+
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_test_results_file} \
80+
SEARCH_PATH=tests/bsim/net/ tests/bsim/run_parallel.sh
81+
82+
- name: Upload Test Results
83+
if: always()
84+
uses: actions/upload-artifact@v3
85+
with:
86+
name: bsim-test-results
87+
path: |
88+
./bsim_out/bsim_results.xml
89+
${{ github.event_path }}
90+
91+
- name: Upload Event Details
92+
if: always()
93+
uses: actions/upload-artifact@v3
94+
with:
95+
name: event
96+
path: |
97+
${{ github.event_path }}

.github/workflows/bsim-tests-publish.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Publish BabbleSim Tests Results
22

33
on:
44
workflow_run:
5-
workflows: ["BabbleSim Tests"]
5+
workflows: ["BabbleSim BT Tests", "BabbleSim Networking Tests"]
66
types:
77
- completed
88
jobs:
@@ -15,7 +15,6 @@ jobs:
1515
- name: Download artifacts
1616
uses: dawidd6/action-download-artifact@v2
1717
with:
18-
workflow: bsim-tests.yaml
1918
run_id: ${{ github.event.workflow_run.id }}
2019

2120
- name: Publish BabbleSim Test Results

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ sanity-out*
3939
twister-out*
4040
bsim_out
4141
bsim_bt_out
42+
tests/RunResults.xml
4243
scripts/grub
4344
doc/reference/kconfig/*.rst
4445
doc/doc.warnings

tests/bsim/compile.sh tests/bsim/bluetooth/compile.sh

-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/audio/compile.sh
2222
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/compile.sh
2323
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/ll/compile.sh
2424
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/mesh/compile.sh
25-
run_in_background ${ZEPHYR_BASE}/tests/bsim/net/compile.sh
2625

2726
wait_for_background_jobs

0 commit comments

Comments
 (0)