Skip to content

Commit fb84792

Browse files
adigierlubos
authored andcommitted
[nrf fromlist] [nrfconnect] Change native_posix_64 to native_sim
* Build Zephyr native tests for 32-bit target. * Use native_sim as native_posix_64 is deprecated and removed in recent version of Zephyr. Upstream PR #: 37686 Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
1 parent d03d3df commit fb84792

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

.github/workflows/examples-nrfconnect.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
- name: Run unit tests for Zephyr native_posix_64 platform
100100
if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' || steps.changed_paths.outputs.nrfconnect == 'true'
101101
run: |
102-
scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target nrf-native-posix-64-tests build"
102+
scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target nrf-native-sim-tests build"
103103
- name: Uploading Failed Test Logs
104104
uses: actions/upload-artifact@v4
105105
if: ${{ failure() && !env.ACT }}

config/nrfconnect/chip-module/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ if (CONFIG_CHIP_CRYPTO_PSA)
194194
matter_add_gn_arg_bool ("chip_crypto_psa_spake2p" CONFIG_PSA_WANT_ALG_SPAKE2P_MATTER)
195195
endif()
196196

197-
if (BOARD STREQUAL "native_posix")
197+
if (BOARD STREQUAL "native_sim")
198198
matter_add_gn_arg_string("target_cpu" "x86")
199-
elseif (BOARD STREQUAL "native_posix_64")
199+
elseif (BOARD STREQUAL "native_sim/native/64")
200200
matter_add_gn_arg_string("target_cpu" "x64")
201201
endif()
202202

config/nxp/chip-module/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ else()
130130
endif()
131131

132132

133-
# if (BOARD STREQUAL "native_posix")
133+
# if (BOARD STREQUAL "native_sim")
134134
# matter_add_gn_arg_string("target_cpu" "x86")
135-
# elseif (BOARD STREQUAL "native_posix_64")
135+
# elseif (BOARD STREQUAL "native_sim/native/64")
136136
# matter_add_gn_arg_string("target_cpu" "x64")
137137
# endif()
138138

config/zephyr/chip-module/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ if(CONFIG_CHIP)
108108
matter_add_gn_arg_bool("chip_inet_config_enable_tcp_endpoint" FALSE)
109109
matter_add_gn_arg_bool("chip_enable_read_client" CONFIG_CHIP_ENABLE_READ_CLIENT)
110110

111-
if(BOARD STREQUAL "native_posix")
111+
if(BOARD STREQUAL "native_sim")
112112
matter_add_gn_arg_string("target_cpu" "x86")
113-
elseif(BOARD STREQUAL "native_posix_64")
113+
elseif(BOARD STREQUAL "native_sim/native/64")
114114
matter_add_gn_arg_string("target_cpu" "x64")
115115
endif()
116116

scripts/build/build/targets.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ def BuildNrfNativeTarget():
304304
target = BuildTarget('nrf', NrfConnectBuilder)
305305

306306
target.AppendFixedTargets([
307-
TargetPart('native-posix-64-tests',
308-
board=NrfBoard.NATIVE_POSIX_64, app=NrfApp.UNIT_TESTS),
307+
TargetPart('native-sim-tests',
308+
board=NrfBoard.NATIVE_SIM, app=NrfApp.UNIT_TESTS),
309309
])
310310

311311
return target

scripts/build/builders/nrf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class NrfBoard(Enum):
118118
NRF52840DK = auto()
119119
NRF52840DONGLE = auto()
120120
NRF5340DK = auto()
121-
NATIVE_POSIX_64 = auto()
121+
NATIVE_SIM = auto()
122122

123123
def GnArgName(self):
124124
if self == NrfBoard.NRF52840DK:
@@ -127,8 +127,8 @@ def GnArgName(self):
127127
return 'nrf52840dongle_nrf52840'
128128
elif self == NrfBoard.NRF5340DK:
129129
return 'nrf5340dk_nrf5340_cpuapp'
130-
elif self == NrfBoard.NATIVE_POSIX_64:
131-
return 'native_posix_64'
130+
elif self == NrfBoard.NATIVE_SIM:
131+
return 'native_sim'
132132
else:
133133
raise Exception('Unknown board type: %r' % self)
134134

scripts/build/testdata/all_targets_linux_x64.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ nxp-{k32w0,k32w1,rw61x,rw61x_eth,mcxw71}-{zephyr,freertos}-{lighting,contact-sen
1717
mbed-cy8cproto_062_4343w-{lock,light,all-clusters,all-clusters-minimal,pigweed,ota-requestor,shell}[-release][-develop][-debug][-data-model-disabled][-data-model-enabled]
1818
mw320-all-clusters-app
1919
nrf-{nrf5340dk,nrf52840dk,nrf52840dongle}-{all-clusters,all-clusters-minimal,lock,light,light-switch,shell,pump,pump-controller,window-covering}[-rpc][-data-model-disabled][-data-model-enabled]
20-
nrf-native-posix-64-tests
20+
nrf-native-sim-tests
2121
nuttx-x64-light
2222
qpg-qpg6105-{lock,light,shell,persistent-storage,light-switch,thermostat}[-updateimage][-data-model-disabled][-data-model-enabled]
2323
stm32-stm32wb5mm-dk-light

src/app/tests/AppTestContext.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void AppContext::TearDownTestSuite()
5252
// This can particularly be a problem when this unprocessed work involves reporting engine runs,
5353
// since those can take a while and cause later tests to not reach their queued work before
5454
// their timeouts hit. This is only an issue in setups where all unit tests are compiled into
55-
// a single file (e.g. nRF CI (Zephyr native_posix)).
55+
// a single file (e.g. nRF CI (Zephyr native_sim)).
5656
//
5757
// Work around this issue by doing a DrainAndServiceIO() here to attempt to flush out any queued-up work.
5858
//

src/test_driver/nrfconnect/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
# @file
1919
# CMake project for building and running selected CHIP unit tests using
2020
# 'nrfconnect' platform integration layer in CHIP and Zephyr
21-
# 'native_posix[_64]' platforms. Note that certain design decisions behind
22-
# the native_posix platforms make them inapplicable for some unit tests,
21+
# 'native_sim[/native/64]' platforms. Note that certain design decisions behind
22+
# the native_sim platforms make them inapplicable for some unit tests,
2323
# hence only a subset of CHIP unit tests is listed in the project.
24-
# See: https://docs.zephyrproject.org/1.12.0/boards/posix/native_posix/doc/board.html
24+
# See: https://docs.zephyrproject.org/4.0.0/boards/native/native_sim/doc/index.html
2525
# for more details.
2626
#
2727

0 commit comments

Comments
 (0)