File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ function run_test() {
44 local target=$1
55 local sketch=$2
66 local options=$3
7+ local erase_flash=$4
78 local sketchdir=$( dirname $sketch )
89 local sketchdirname=$( basename $sketchdir )
910
@@ -16,6 +17,10 @@ function run_test() {
1617 for i in ` seq 0 $(( $len - 1 )) `
1718 do
1819 echo " Running test: $sketchdirname -- Config: $i "
20+ if [ $erase_flash -eq 1 ]; then
21+ esptool.py -c $target erase_flash
22+ fi
23+
1924 pytest tests --build-dir tests/$sketchdirname /build$i -k test_$sketchdirname --junit-xml=tests/$sketchdirname /$sketchdirname$i .xml
2025 result=$?
2126 if [ $result -ne 0 ]; then
@@ -54,6 +59,9 @@ while [ ! -z "$1" ]; do
5459 shift
5560 chunk_max=$1
5661 ;;
62+ -e )
63+ erase=$1
64+ ;;
5765 -h )
5866 echo " $USAGE "
5967 exit 0
6876source ${SCRIPTS_DIR} /install-arduino-ide.sh
6977
7078if [ $chunk_run -eq 0 ]; then
71- run_test $target $PWD /tests/$sketch /$sketch .ino $options
79+ run_test $target $PWD /tests/$sketch /$sketch .ino $options $erase
7280else
7381 if [ " $chunk_max " -le 0 ]; then
7482 echo " ERROR: Chunks count must be positive number"
124132 echo " "
125133 echo " Sketch Index $(( $sketchnum - 1 )) "
126134
127- run_test $target $sketch
135+ run_test $target $sketch $options $erase
128136 done
129137fi
Original file line number Diff line number Diff line change 9999
100100 - name : Run Tests
101101 run : |
102- bash .github/scripts/tests_run.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}}
102+ bash .github/scripts/tests_run.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}} -e
103103
104104 - name : Upload test result artifacts
105105 uses : actions/upload-artifact@v2
You can’t perform that action at this time.
0 commit comments