Skip to content

Commit

Permalink
tests/ports/psoc6/run_psoc6_tests.sh: Adding print failures by default.
Browse files Browse the repository at this point in the history
Signed-off-by: enriquezgarc <[email protected]>
  • Loading branch information
jaenrig-ifx committed Aug 8, 2024
1 parent 7a7c337 commit 215f1f2
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions tests/ports/psoc6/run_psoc6_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,12 @@ start_test_info() {

run_tests() {
tests_name=$1
debug=$2
test_dev=$3
tests=$4
excluded_tests=$5
stub_name=$6
stub_dev=$7
stub_script=$8
test_dev=$2
tests=$3
excluded_tests=$4
stub_name=$5
stub_dev=$6
stub_script=$7

start_test_info "${tests_name}" "${test_dev}" "${stub_dev}"

Expand All @@ -146,13 +145,14 @@ run_tests() {

./run-tests.py --target psoc6 --device ${test_dev} ${test_dir_flag} ${tests} ${excluded_tests}

update_test_result $?
exit_code = $?

if [ "${debug}" = "true" ]; then
echo "Running command: ./run-tests.py --print-failures"
if [ ${exit_code} -ne 0 ]; then
./run-tests.py --print-failures
./run-tests.py --clean-failures
fi

update_test_result ${exit_code}

}

Expand All @@ -175,7 +175,7 @@ mpremote_vfs_large_file_tests() {
}

vfs_flash_tests() {
run_tests "file system flash" false ${dev_test} \
run_tests "file system flash" ${dev_test} \
"extmod/vfs_basic.py
extmod/vfs_lfs_superblock.py
extmod/vfs_userfs.py"
Expand All @@ -185,19 +185,19 @@ vfs_flash_tests() {
}

vfs_sdcard_tests() {
run_tests "file system sdcard" false ${dev_test} "${tests_psoc6_dir}/hw_ext/sdcard.py"
run_tests "file system sdcard" ${dev_test} "${tests_psoc6_dir}/hw_ext/sdcard.py"

storage_device="sd"
mpremote_vfs_large_file_tests
}

no_ext_hw_tests() {
run_tests "no extended hardware" false ${dev_test} "${tests_psoc6_dir}" \
run_tests "no extended hardware" ${dev_test} "${tests_psoc6_dir}" \
"-e ${tests_psoc6_dir}/wdt.py -e ${tests_psoc6_dir}/wdt_reset_check.py"
}

hw_ext_tests() {
run_tests "hardware extended" false ${dev_test} "${tests_psoc6_dir}/hw_ext" \
run_tests "hardware extended" ${dev_test} "${tests_psoc6_dir}/hw_ext" \
"-e ${tests_psoc6_dir}/hw_ext/i2c.py \
-e ${tests_psoc6_dir}/hw_ext/sdcard.py \
-e ${tests_psoc6_dir}/hw_ext/uart.py \
Expand All @@ -206,34 +206,34 @@ hw_ext_tests() {
}

adc_tests() {
run_tests "adc" false ${dev_test} "${tests_psoc6_dir}/hw_ext/adc.py"
run_tests "adc" ${dev_test} "${tests_psoc6_dir}/hw_ext/adc.py"
}

#PWM
pwm_tests() {
run_tests "pwm" true ${dev_test} "${tests_psoc6_dir}/hw_ext/pwm.py"
run_tests "pwm" ${dev_test} "${tests_psoc6_dir}/hw_ext/pwm.py"
}

i2c_tests() {
run_tests "i2c" false ${dev_test} "${tests_psoc6_dir}/hw_ext/i2c.py"
run_tests "i2c" ${dev_test} "${tests_psoc6_dir}/hw_ext/i2c.py"
}

uart_tests() {
run_tests "uart" false ${dev_test} "${tests_psoc6_dir}/hw_ext/uart.py"
run_tests "uart" ${dev_test} "${tests_psoc6_dir}/hw_ext/uart.py"
}

bitstream_tests() {
run_tests "bitstream" false ${dev_test} "${tests_psoc6_dir}/hw_ext/multi_stub/bitstream_rx.py" \
run_tests "bitstream" ${dev_test} "${tests_psoc6_dir}/hw_ext/multi_stub/bitstream_rx.py" \
"" "bitstream_tx" ${dev_stub} "${tests_psoc6_dir}/hw_ext/multi_stub/bitstream_tx.py"
}

spi_tests() {
run_tests "spi" false ${dev_test} "${tests_psoc6_dir}/hw_ext/multi_stub/spi_master.py" \
run_tests "spi" ${dev_test} "${tests_psoc6_dir}/hw_ext/multi_stub/spi_master.py" \
"" "spi_slave" ${dev_stub} "${tests_psoc6_dir}/hw_ext/multi_stub/spi_slave.py"
}

i2s_tests() {
run_tests "i2s" false ${dev_test} "${tests_psoc6_dir}/hw_ext/multi_stub/i2s_rx.py" \
run_tests "i2s" ${dev_test} "${tests_psoc6_dir}/hw_ext/multi_stub/i2s_rx.py" \
"" "i2s_tx" ${dev_stub} "${tests_psoc6_dir}/hw_ext/multi_stub/i2s_tx.py"
}

Expand Down

0 comments on commit 215f1f2

Please sign in to comment.