diff --git a/.github/workflows/02-Run_Unit_Test.yaml b/.github/workflows/02-Run_Unit_Test.yaml index e8e75216..5652c39f 100644 --- a/.github/workflows/02-Run_Unit_Test.yaml +++ b/.github/workflows/02-Run_Unit_Test.yaml @@ -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 @@ -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: @@ -58,18 +58,19 @@ 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 @@ -77,10 +78,7 @@ jobs: 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 @@ -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: @@ -143,18 +141,19 @@ 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 @@ -162,10 +161,7 @@ jobs: 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