Skip to content

Commit

Permalink
Update 02-Run_Unit_Test.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Silabs-ThieuVu authored Oct 17, 2024
1 parent 0170442 commit 90304e5
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions .github/workflows/02-Run_Unit_Test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:
default: 'dev'
env:
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
REPO_BRANCH: ${{ github.event.inputs.branch }}
REPO_NAME: ${{ github.repository }}
REPO_BRANCH: ${{ github.head_ref || github.ref_name }}
REPO_NAME: ${{ github.event.repository.name }}
JLINK_PATH: /opt/SEGGER/JLink/libjlinkarm.so
SDK_PATH: $HOME/SimplicityStudio/SDKs/gecko_sdk
SDK_PATH: /home/sqa/SimplicityStudio/SDKs/gecko_sdk
jobs:
job1:
name: Unit test for mg24 with gcc
Expand All @@ -31,7 +31,7 @@ jobs:
COMPONENTS: all
ADAPTER_SN: 440111030
CHIP: EFR32MG24BXXXF1536
TOOL_DIRS: $HOME/SimplicityStudio-5/SimplicityStudio_v5/developer/toolchains/gnu_arm/12.2.rel1_2023.7/bin
TOOL_DIRS: /home/sqa/SimplicityStudio-5/SimplicityStudio_v5/developer/toolchains/gnu_arm/12.2.rel1_2023.7/bin
START_ADDR_FLASH: 0x8000000

steps:
Expand All @@ -58,29 +58,27 @@ jobs:
cd $SDK_PATH
cd extension
ls -la
rm -rd $REPO_NAME || true
git clone $REPO_URL
ls -la
cd $REPO_URL
cd $REPO_NAME
git checkout $REPO_BRANCH
ls -la
- name: Run test
run: |
export PATH=$PATH:$HOME/SimplicityStudio-5/SimplicityStudio_v5/developer/adapter_packs/commander
export PATH=$PATH:$HOME/slc_cli
export PATH=$PATH:~/SimplicityStudio-5/SimplicityStudio_v5/developer/adapter_packs/commander
export PATH=$PATH:~/slc_cli
export PATH=$PATH:/usr/bin/
export PATH=$PATH:$HOME/amazon-corretto-17.0.12.7.1-linux-x64/bin
export LST_PATH=$PWD/build/test/integration_test/build/$BOARD_NAME/integration_test_iec60730_watchdog/S
export PATH=$PATH:~/amazon-corretto-17.0.12.7.1-linux-x64/bin
export LST_PATH=$PWD/build/test/integration_test/build/${BOARD_NAME}/integration_test_iec60730_watchdog/S
slc configuration --sdk=${SDK_PATH}
ninja --version
slc signature trust --sdk $SDK_PATH
slc configuration -gcc=$TOOL_DIRS
make prepare
cd build
slc signature trust -extpath $SDK_PATH/extension/$REPO_NAME
cmake --toolchain ../cmake/toolchain.cmake .. -DENABLE_INTEGRATION_TESTING=ON -DBOARD_NAME=$BOARD_NAME
make unit_test_info -j4
cd ../test
mkdir log
echo 'bash execute_unit_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER' > log/Test_integration_$BOARD_NAME_GCC_1.txt
#echo 'bash execute_unit_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DENABLE_CAL_CRC_32=ON"' > log/Test_integration_$BOARD_NAME_GCC_2.txt
Expand Down Expand Up @@ -116,7 +114,7 @@ jobs:
COMPONENTS: all
ADAPTER_SN: 440189400
CHIP: EFR32MG12
TOOL_DIRS: $HOME/SimplicityStudio-5/SimplicityStudio_v5/developer/toolchains/gnu_arm/12.2.rel1_2023.7/bin
TOOL_DIRS: /home/sqa/SimplicityStudio-5/SimplicityStudio_v5/developer/toolchains/gnu_arm/12.2.rel1_2023.7/bin
START_ADDR_FLASH: 0x0000000

steps:
Expand All @@ -143,29 +141,27 @@ jobs:
cd $SDK_PATH
cd extension
ls -la
rm -rd $REPO_NAME || true
git clone $REPO_URL
ls -la
cd $REPO_URL
cd $REPO_NAME
git checkout $REPO_BRANCH
ls -la
- name: Prepare environment
- name: Run test
run: |
export PATH=$PATH:$HOME/SimplicityStudio-5/SimplicityStudio_v5/developer/adapter_packs/commander
export PATH=$PATH:$HOME/slc_cli
export PATH=$PATH:~/SimplicityStudio-5/SimplicityStudio_v5/developer/adapter_packs/commander
export PATH=$PATH:~/slc_cli
export PATH=$PATH:/usr/bin/
export PATH=$PATH:$HOME/amazon-corretto-17.0.12.7.1-linux-x64/bin
export LST_PATH=$PWD/build/test/integration_test/build/$BOARD_NAME/integration_test_iec60730_watchdog/S
export PATH=$PATH:~/amazon-corretto-17.0.12.7.1-linux-x64/bin
export LST_PATH=$PWD/build/test/integration_test/build/${BOARD_NAME}/integration_test_iec60730_watchdog/S
slc configuration --sdk=${SDK_PATH}
ninja --version
slc signature trust --sdk $SDK_PATH
slc configuration -gcc=$TOOL_DIRS
make prepare
cd build
slc signature trust -extpath $SDK_PATH/extension/$REPO_NAME
cmake --toolchain ../cmake/toolchain.cmake .. -DENABLE_INTEGRATION_TESTING=ON -DBOARD_NAME=$BOARD_NAME
make unit_test_info -j4
cd ../test
mkdir log
echo 'bash execute_unit_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER' > log/Test_integration_$BOARD_NAME_GCC_1.txt
#echo 'bash execute_unit_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DENABLE_CAL_CRC_32=ON"' > log/Test_integration_$BOARD_NAME_GCC_2.txt
Expand Down

0 comments on commit 90304e5

Please sign in to comment.