-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Tests workflow, will house certification tests (#7381)
* Initial stab * Adding test runs * Removing this * Making this +x * Oops * Running all tests * Delete storage just inc ase * Trying to run this in darwin too * Moving darwin into tests * Testing out mbedtls * Fixing gStorage * Fixing quoting * Wait for pairing * next * Trying 0.0.0.0 * ::1 * Testing cache * Removing cache * IPv6 localhost for today * IPv6 localhost * Moving to this pin code * check validity of mTransportMgr * collect core dump * remove controller shutdown * delay controller shutdown in the test * restyled * Removing this, not needed anymore * Empty defines * Update scripts/tests/test_suites.sh Co-authored-by: Boris Zbarsky <[email protected]> * Adding todos Co-authored-by: Pankaj Garg <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]>
- Loading branch information
1 parent
2d832bf
commit 8402293
Showing
7 changed files
with
171 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Copyright (c) 2020-2021 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test_suites_linux: | ||
name: Test Suites - Linux | ||
timeout-minutes: 60 | ||
|
||
if: github.actor != 'restyled-io[bot]' | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: connectedhomeip/chip-build:latest | ||
options: | ||
--privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 | ||
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Bootstrap | ||
timeout-minutes: 3 | ||
run: scripts/build/gn_bootstrap.sh | ||
- name: Build all clusters app | ||
timeout-minutes: 5 | ||
run: | | ||
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false | ||
- name: Build chip-tool | ||
timeout-minutes: 5 | ||
run: | | ||
scripts/examples/gn_build_example.sh examples/chip-tool out/debug/standalone/ | ||
- name: Run Tests | ||
timeout-minutes: 5 | ||
run: | | ||
ifconfig -a | ||
scripts/tests/test_suites.sh | ||
test_suites_darwin: | ||
name: Test Suites - Darwin | ||
timeout-minutes: 60 | ||
|
||
if: github.actor != 'restyled-io[bot]' | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Setup Environment | ||
run: brew install openssl pkg-config | ||
- name: Fix pkgconfig link | ||
working-directory: /usr/local/lib/pkgconfig | ||
run: | | ||
pwd | ||
ls -la /usr/local/Cellar/ | ||
ls -la /usr/local/Cellar/[email protected] | ||
OPEN_SSL_VERSION=`ls -la /usr/local/Cellar/[email protected] | cat | tail -n1 | awk '{print $NF}'` | ||
ln -s /usr/local/Cellar/[email protected]/$OPEN_SSL_VERSION/lib/pkgconfig/* . | ||
- name: Bootstrap | ||
timeout-minutes: 3 | ||
run: scripts/build/gn_bootstrap.sh | ||
- name: Run Build Test Server | ||
timeout-minutes: 5 | ||
run: | | ||
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false | ||
- name: Build chip-tool | ||
timeout-minutes: 5 | ||
run: | | ||
scripts/examples/gn_build_example.sh examples/chip-tool out/debug/standalone/ | ||
- name: Run Test Suites | ||
timeout-minutes: 5 | ||
run: | | ||
scripts/tests/test_suites.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# Copyright (c) 2020 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
set -e | ||
|
||
declare -a test_array="($(find src/app/tests/suites -type f -name "*.yaml" -exec basename {} .yaml \;))" | ||
|
||
echo "Found tests:" | ||
for i in "${test_array[@]}"; do | ||
echo " $i" | ||
done | ||
echo "" | ||
echo "" | ||
|
||
for i in "${test_array[@]}"; do | ||
echo " ===== Running test: $i" | ||
echo " * Starting cluster server" | ||
rm -rf /tmp/chip_tool_config.ini | ||
sleep 1 | ||
out/debug/chip-all-clusters-app & | ||
background_pid=$! | ||
sleep 1 | ||
echo " * Pairing to device" | ||
out/debug/standalone/chip-tool pairing onnetwork 1 20202021 3840 ::1 11097 | ||
sleep 1 | ||
echo " * Starting test run: $i" | ||
out/debug/standalone/chip-tool tests "$i" | ||
kill -9 "$background_pid" || true | ||
echo " ===== Test complete: $i" | ||
sleep 2 | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters