File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ function run_test() {
4
4
local target=$1
5
5
local sketch=$2
6
6
local options=$3
7
+ local erase_flash=$4
7
8
local sketchdir=$( dirname $sketch )
8
9
local sketchdirname=$( basename $sketchdir )
9
10
@@ -16,6 +17,10 @@ function run_test() {
16
17
for i in ` seq 0 $(( $len - 1 )) `
17
18
do
18
19
echo " Running test: $sketchdirname -- Config: $i "
20
+ if [ $erase_flash -eq 1 ]; then
21
+ esptool.py -c $target erase_flash
22
+ fi
23
+
19
24
pytest tests --build-dir tests/$sketchdirname /build$i -k test_$sketchdirname --junit-xml=tests/$sketchdirname /$sketchdirname$i .xml
20
25
result=$?
21
26
if [ $result -ne 0 ]; then
@@ -54,6 +59,9 @@ while [ ! -z "$1" ]; do
54
59
shift
55
60
chunk_max=$1
56
61
;;
62
+ -e )
63
+ erase=$1
64
+ ;;
57
65
-h )
58
66
echo " $USAGE "
59
67
exit 0
68
76
source ${SCRIPTS_DIR} /install-arduino-ide.sh
69
77
70
78
if [ $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
72
80
else
73
81
if [ " $chunk_max " -le 0 ]; then
74
82
echo " ERROR: Chunks count must be positive number"
124
132
echo " "
125
133
echo " Sketch Index $(( $sketchnum - 1 )) "
126
134
127
- run_test $target $sketch
135
+ run_test $target $sketch $options $erase
128
136
done
129
137
fi
Original file line number Diff line number Diff line change 99
99
100
100
- name : Run Tests
101
101
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
103
103
104
104
- name : Upload test result artifacts
105
105
uses : actions/upload-artifact@v2
You can’t perform that action at this time.
0 commit comments