@@ -11,9 +11,11 @@ function run_test {
1111 local error=0
1212 local sdkconfig_path
1313 local extra_args
14+ local test_type
1415
1516 sketchdir=$( dirname " $sketch " )
1617 sketchname=$( basename " $sketchdir " )
18+ test_type=$( basename " $( dirname " $sketchdir " ) " )
1719
1820 if [ " $options " -eq 0 ] && [ -f " $sketchdir " /ci.json ]; then
1921 len=$( jq -r --arg target " $target " ' .fqbn[$target] | length' " $sketchdir " /ci.json)
@@ -113,14 +115,14 @@ function run_test {
113115 rm " $sketchdir " /diagram.json 2> /dev/null || true
114116
115117 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=$?
118120 printf " \n"
119121 if [ $result -ne 0 ]; then
120122 result=0
121123 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=$?
124126 printf " \n"
125127 if [ $result -ne 0 ]; then
126128 printf " \033[91mFailed test: %s -- Config: %s\033[0m\n\n" " $sketchname " " $i "
0 commit comments