4 # Copyright (c) 2020 Project CHIP Authors
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
20 # This is scripts builds ESP32 QEMU, and runs CHIP unit tests using it.
27 here=$(cd "$(dirname "$0")" && pwd)
28 chip_dir="$here"/../..
30 if [[ -n "$1" ]]; then
35 # shellcheck source=/dev/null
36 source "$chip_dir"/src/test_driver/esp32/idf.sh
37 "$chip_dir"/src/test_driver/esp32/qemu_setup.sh
45 idf scripts/tools/qemu_run_test.sh src/test_driver/esp32/build/chip "$1" "$2"
49 if [[ -d "${log_dir}" ]]; then
52 really_run_suite "$1" "$2" |& tee "$log_dir/$suite.log"
54 really_run_suite "$1" "$2"
58 # Currently only crypto, inet, and system tests are configured to run on QEMU.
59 # The specific qualifiers will be removed, once all CHIP unit tests are
60 # updated to run on QEMU.
64 run_suite libAppTests.a
65 run_suite libASN1Tests.a
66 run_suite libBleLayerTests.a
67 run_suite libCoreTests.a
68 run_suite libInetLayerTests.a
69 run_suite libRetransmitTests.a
70 run_suite libSystemLayerTests.a
71 run_suite libChipCryptoTests.a
73 # TODO: Transport layer tests do not link:
75 # - ArgParser for IPAddresses are not linked in
76 # - std::__throw_bad_alloc() linker errors
77 # run_suite libRawTransportTests.a "-lNetworkTestHelpers -lInetTestHelpers"
79 # TODO: Transport layer tests do not link:
81 # - ArgParser for IPAddresses are not linked in
82 # - std::__throw_bad_alloc() linker errors
83 # run_suite libTransportLayerTests.a "-lNetworkTestHelpers -lInetTestHelpers"