Skip to content

Commit

Permalink
test autometed ROM report generation
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanHri committed Dec 29, 2023
1 parent 694df6a commit b62e8a5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 15 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
west zephyr-export
pip install -r ~/zephyrproject/zephyr/scripts/requirements.txt
pip install tabulate
cd ~
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.3/zephyr-sdk-0.16.3_linux-x86_64.tar.xz
Expand Down Expand Up @@ -77,6 +78,17 @@ jobs:
name: uoscore-uedhoc-x86-64
path: test/build/uoscore_uedhoc/libuoscore-uedhoc.a

### Generate ROM report
- name: Genrate ROM report
run: |
bash ci_scripts/flash_report_gen.sh
- name: Upload rom report
uses: actions/upload-pages-artifact@v1
with:
name: github-pages
path: test/build_reports/rom_report_nrf91_with_tinycrypt.txt

### Generate test coverage/stack/flash report
- name: Build native_posix with coverage information
run: |
Expand All @@ -90,26 +102,20 @@ jobs:
lcov --capture --directory ./ --output-file lcov.info -q --rc lcov_branch_coverage=1
genhtml lcov.info --output-directory lcov_html -q --ignore-errors source --branch-coverage --highlight --legend
tar -zcvf github-pages.tar.gz lcov_html
bash ci_scripts/flash_report_gen.sh
bash ci_scripts/stack_report_gen.sh
- name: Upload test coverage report
uses: actions/upload-pages-artifact@v1
with:
name: github-pages
path: test/lcov_html

- name: Upload rom report
uses: actions/upload-pages-artifact@v1
with:
name: github-pages
path: test/build_reports/rom_report_nrf91_with_tinycrypt.txt

- name: Upload stack report
uses: actions/upload-pages-artifact@v1
with:
name: github-pages
path: test/build_reports/stack_report.html

# - name: Upload stack report
# uses: actions/upload-pages-artifact@v1
# with:
# name: github-pages
# path: test/build_reports/stack_report.html


# Deploy job
Expand Down
12 changes: 9 additions & 3 deletions test/ci_scripts/flash_report_gen.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/sh
#set -x #echo on

# run this script from the "test" directory after Zephyr is initialized with:
# cd <to test dir>
# ./ci_scripts/flash_report_gen.sh
# the script produces build_reports/flash_report.txt

echo "\n"
echo "*********************************************************************\n"
echo "start flash_report_gen.sh\n"
echo "*********************************************************************\n"
mkdir -p build_reports
rm -rf build_reports/rom_report_nrf91_with_tinycrypt.txt

Expand All @@ -15,10 +20,11 @@ rm -rf build_reports/rom_report_nrf91_with_tinycrypt.txt
rm -rf build
west build -b nrf9160dk_nrf9160 -- -DCOMMAND_LINE_FLAGS="-DMESSAGE_4 -DTINYCRYPT"
west build -t rom_report > build_reports/rom_report_nrf91_with_tinycrypt.txt
echo "\n\n\n"

# MBEDTLS YES
# MESSAGE_4: YES
# VLA: YES
rm -rf build
west build -b nrf9160dk_nrf9160 -- -DCOMMAND_LINE_FLAGS="-DMESSAGE_4 -DMBEDTLS"
west build -t rom_report > build_reports/rom_report_nrf91_with_mbedtls.txt
#rm -rf build
#west build -b nrf9160dk_nrf9160 -- -DCOMMAND_LINE_FLAGS="-DMESSAGE_4 -DMBEDTLS"
#west build -t rom_report > build_reports/rom_report_nrf91_with_mbedtls.txt

0 comments on commit b62e8a5

Please sign in to comment.