@@ -11,9 +11,11 @@ function run_test {
11
11
local error=0
12
12
local sdkconfig_path
13
13
local extra_args
14
+ local test_type
14
15
15
16
sketchdir=$( dirname " $sketch " )
16
17
sketchname=$( basename " $sketchdir " )
18
+ test_type=$( basename " $( dirname " $sketchdir " ) " )
17
19
18
20
if [ " $options " -eq 0 ] && [ -f " $sketchdir " /ci.json ]; then
19
21
len=$( jq -r --arg target " $target " ' .fqbn[$target] | length' " $sketchdir " /ci.json)
@@ -113,14 +115,14 @@ function run_test {
113
115
rm " $sketchdir " /diagram.json 2> /dev/null || true
114
116
115
117
result=0
116
- printf " \033[95mpytest \" %s/test_%s.py\" --build-dir \" %s\" --junit-xml=\" %s\" %s \033[0m\n" " $sketchdir " " $sketchname " " $build_dir " " $report_file " " ${extra_args[*]@ Q} "
117
- bash -c " set +e; pytest \" $sketchdir /test_$sketchname .py\" --build-dir \" $build_dir \" --junit-xml=\" $report_file \" ${extra_args[*]@ Q} ; exit \$ ?" || result=$?
118
+ printf " \033[95mpytest \" %s/test_%s.py\" --build-dir \" %s\" --junit-xml=\" %s\" -o junit_suite_name=%s %s \033[0m\n" " $sketchdir " " $sketchname " " $build_dir " " $report_file " " $test_type \_ $sketchname \_ $target " " ${extra_args[*]@ Q} "
119
+ bash -c " set +e; pytest \" $sketchdir /test_$sketchname .py\" --build-dir \" $build_dir \" --junit-xml=\" $report_file \" -o junit_suite_name= $test_type \_ $sketchname \_ $target ${extra_args[*]@ Q} ; exit \$ ?" || result=$?
118
120
printf " \n"
119
121
if [ $result -ne 0 ]; then
120
122
result=0
121
123
printf " \033[95mRetrying test: %s -- Config: %s\033[0m\n" " $sketchname " " $i "
122
- printf " \033[95mpytest \" %s/test_%s.py\" --build-dir \" %s\" --junit-xml=\" %s\" %s \033[0m\n" " $sketchdir " " $sketchname " " $build_dir " " $report_file " " ${extra_args[*]@ Q} "
123
- bash -c " set +e; pytest \" $sketchdir /test_$sketchname .py\" --build-dir \" $build_dir \" --junit-xml=\" $report_file \" ${extra_args[*]@ Q} ; exit \$ ?" || result=$?
124
+ printf " \033[95mpytest \" %s/test_%s.py\" --build-dir \" %s\" --junit-xml=\" %s\" -o junit_suite_name=%s %s \033[0m\n" " $sketchdir " " $sketchname " " $build_dir " " $report_file " " $test_type \_ $sketchname \_ $target " " ${extra_args[*]@ Q} "
125
+ bash -c " set +e; pytest \" $sketchdir /test_$sketchname .py\" --build-dir \" $build_dir \" --junit-xml=\" $report_file \" -o junit_suite_name= $test_type \_ $sketchname \_ $target ${extra_args[*]@ Q} ; exit \$ ?" || result=$?
124
126
printf " \n"
125
127
if [ $result -ne 0 ]; then
126
128
printf " \033[91mFailed test: %s -- Config: %s\033[0m\n\n" " $sketchname " " $i "
0 commit comments