Skip to content

Commit

Permalink
tools/ci.sh: Adding new functions for psoc6 ci port.
Browse files Browse the repository at this point in the history
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
  • Loading branch information
jaenrig-ifx committed Aug 4, 2023
1 parent 112a206 commit 106c007
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions tools/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,17 @@ MPY_MTB_CI_DOCKER_VERSION=0.3.0
function ci_psoc6_setup {
# Access to serial device
if [ "$1" = "--dev-access" ]; then
device_flag=--device=/dev/ttyACM0
device0_flag=--device=/dev/ttyACM0
device1_flag=--device=/dev/ttyACM1
else
device_flag=
device0_flag=
device1_flag=
fi

docker pull ifxmakers/mpy-mtb-ci:${MPY_MTB_CI_DOCKER_VERSION}
docker run --name mtb-ci --rm --privileged -d -it ${device_flag} \
docker run --name mtb-ci --rm --privileged -d -it \
${device0_flag} \
${device1_flag} \
-v "$(pwd)":/micropython \
-w /micropython/ports/psoc6 \
ifxmakers/mpy-mtb-ci:${MPY_MTB_CI_DOCKER_VERSION}
Expand All @@ -261,10 +265,21 @@ function ci_psoc6_deploy {
docker exec mtb-ci make mpy_program
}

function ci_psoc6_flash_multiple_devices {
hex_file=$1
docker exec mtb-ci make program_multi_ext_hex EXT_HEX_FILE=${hex_file}
}

function ci_psoc6_run_tests {
docker exec mtb-ci /bin/bash -c "cd ../../tests && ./run-tests.py --target psoc6 --device /dev/ttyACM0 -d psoc6"
}

# echo ${{ secrets.SELF_HOSTED_PASSWORD }} | sudo -S rm -rf ${GITHUB_WORKSPACE}
# mkdir ${GITHUB_WORKSPACE}
# docker stop mtb-ci
# docker rm mtb-ci
# docker image prune -all

########################################################################################
# ports/qemu-arm

Expand Down

0 comments on commit 106c007

Please sign in to comment.