-
Notifications
You must be signed in to change notification settings - Fork 833
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7213cb3
commit c4cbf05
Showing
14 changed files
with
161 additions
and
32 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,95 @@ | ||
name: Zephyr tests | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
run_test: | ||
name: Build and run | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
# Don't prompt for anything | ||
export DEBIAN_FRONTEND=noninteractive | ||
sudo apt-get update | ||
# most of the ci-base zephyr docker image packages | ||
sudo apt-get install -y zip bridge-utils uml-utilities \ | ||
git cmake ninja-build gperf ccache dfu-util device-tree-compiler wget \ | ||
python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \ | ||
make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1 \ | ||
autoconf automake bison build-essential ca-certificates cargo ccache chrpath cmake \ | ||
cpio device-tree-compiler dfu-util diffstat dos2unix doxygen file flex g++ gawk gcc \ | ||
gcovr git git-core gnupg gperf gtk-sharp2 help2man iproute2 lcov libcairo2-dev \ | ||
libglib2.0-dev libgtk2.0-0 liblocale-gettext-perl libncurses5-dev libpcap-dev \ | ||
libpopt0 libsdl1.2-dev libsdl2-dev libssl-dev libtool libtool-bin locales make \ | ||
net-tools ninja-build openssh-client parallel pkg-config python3-dev python3-pip \ | ||
python3-ply python3-setuptools python-is-python3 qemu rsync socat srecord sudo \ | ||
texinfo unzip wget ovmf xz-utils | ||
- name: Install west | ||
run: sudo pip install west | ||
|
||
- name: Init west workspace | ||
run: west init zephyr | ||
|
||
- name: Update west.yml | ||
working-directory: zephyr/zephyr | ||
run: | | ||
REF=$(echo '${{ github.ref }}' | sed -e 's/\//\\\//g') | ||
sed -e 's/remotes:/remotes:\n \- name: wolfssl\n url\-base: https:\/\/github.com\/${{ github.repository_owner }}/' -i west.yml | ||
sed -e "s/projects:/projects:\n \- name: wolfssl\n path: modules\/crypto\/wolfssl\n remote: wolfssl\n revision: $REF/" -i west.yml | ||
- name: Update west workspace | ||
working-directory: zephyr | ||
run: west update -n -o=--depth=1 | ||
|
||
- name: Export zephyr | ||
working-directory: zephyr | ||
run: west zephyr-export | ||
|
||
- name: Install pip dependencies | ||
working-directory: zephyr | ||
run: sudo pip install -r zephyr/scripts/requirements.txt | ||
|
||
- name: Install zephyr SDK | ||
run: | | ||
wget -q https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.1/zephyr-sdk-0.16.1_linux-x86_64.tar.xz | ||
tar xf zephyr-sdk-0.16.1_linux-x86_64.tar.xz | ||
cd zephyr-sdk-0.16.1 | ||
./setup.sh -h -c | ||
- name: Run wolfssl test | ||
id: wolfssl-test | ||
working-directory: zephyr | ||
run: | | ||
./zephyr/scripts/twister --testsuite-root modules/crypto/wolfssl --test zephyr/samples/wolfssl_test/sample.crypto.wolfssl_test -vvv | ||
rm -rf zephyr/twister-out | ||
- name: Run wolfssl TLS sock test | ||
id: wolfssl-tls-sock | ||
working-directory: zephyr | ||
run: | | ||
./zephyr/scripts/twister --testsuite-root modules/crypto/wolfssl --test zephyr/samples/wolfssl_tls_sock/sample.crypto.wolfssl_tls_sock -vvv | ||
rm -rf zephyr/twister-out | ||
- name: Run wolfssl TLS thread test | ||
id: wolfssl-tls-thread | ||
working-directory: zephyr | ||
run: | | ||
./zephyr/scripts/twister --testsuite-root modules/crypto/wolfssl --test zephyr/samples/wolfssl_tls_thread/sample.crypto.wolfssl_tls_thread -vvv | ||
rm -rf zephyr/twister-out | ||
- name: Zip failure logs | ||
if: ${{ failure() && (steps.wolfssl-test.outcome == 'failure' || steps.wolfssl-tls-sock.outcome == 'failure' || steps.wolfssl-tls-thread.outcome == 'failure') }} | ||
run: | | ||
zip -9 -r logs.zip zephyr/twister-out | ||
- name: Upload failure logs | ||
if: ${{ failure() && (steps.wolfssl-test.outcome == 'failure' || steps.wolfssl-tls-sock.outcome == 'failure' || steps.wolfssl-tls-thread.outcome == 'failure') }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: zephyr-client-test-logs | ||
path: logs.zip | ||
retention-days: 5 |
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
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
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 |
---|---|---|
@@ -1,9 +1,16 @@ | ||
common: | ||
harness: crypto | ||
tags: crypto | ||
sample: | ||
description: wolfSSL TLS test application | ||
name: wolfSSL TLS Test | ||
common: | ||
harness: console | ||
harness_config: | ||
type: multi_line | ||
regex: | ||
- "Server Return: 0" | ||
- "Client Return: 0" | ||
tests: | ||
test: | ||
platform_whitelist: qemu_x86 | ||
sample.crypto.wolfssl_tls_sock: | ||
timeout: 60 | ||
platform_allow: qemu_x86 | ||
integration_platforms: | ||
- qemu_x86 |
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 |
---|---|---|
@@ -1,9 +1,18 @@ | ||
common: | ||
harness: crypto | ||
tags: crypto | ||
sample: | ||
description: wolfSSL TLS test application | ||
name: wolfSSL TLS Test | ||
common: | ||
harness: console | ||
harness_config: | ||
type: multi_line | ||
regex: | ||
- "Server Return: 0" | ||
- "Server Error: 0" | ||
- "Client Return: 0" | ||
- "Client Error: 0" | ||
tests: | ||
test: | ||
platform_whitelist: qemu_x86 | ||
sample.crypto.wolfssl_tls_thread: | ||
timeout: 60 | ||
platform_allow: qemu_x86 | ||
integration_platforms: | ||
- qemu_x86 |
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