File tree Expand file tree Collapse file tree 3 files changed +19
-22
lines changed Expand file tree Collapse file tree 3 files changed +19
-22
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,16 @@ function build(){
2323 args+=" -i $chunk_index -m $chunks_cnt "
2424 ${BUILD_SKETCHES} ${args}
2525 else
26- if [ " $OS_IS_WINDOWS " == " 1" ]; then
27- local ctags_version=` ls " $ARDUINO_IDE_PATH /tools-builder/ctags/" `
28- local preprocessor_version=` ls " $ARDUINO_IDE_PATH /tools-builder/arduino-preprocessor/" `
29- win_opts=" -prefs=runtime.tools.ctags.path=$ARDUINO_IDE_PATH /tools-builder/ctags/$ctags_version
30- -prefs=runtime.tools.arduino-preprocessor.path=$ARDUINO_IDE_PATH /tools-builder/arduino-preprocessor/$preprocessor_version "
31- args+=" -w \" ${win_opts} \" "
32- fi
33-
3426 for sketch in ${sketches} ; do
35- ${BUILD_SKETCH} ${args} " -s $( dirname $sketch ) "
27+ args+=" -s $( dirname $sketch ) "
28+ if [ " $OS_IS_WINDOWS " == " 1" ]; then
29+ local ctags_version=` ls " $ARDUINO_IDE_PATH /tools-builder/ctags/" `
30+ local preprocessor_version=` ls " $ARDUINO_IDE_PATH /tools-builder/arduino-preprocessor/" `
31+ win_opts=" -prefs=runtime.tools.ctags.path=$ARDUINO_IDE_PATH /tools-builder/ctags/$ctags_version
32+ -prefs=runtime.tools.arduino-preprocessor.path=$ARDUINO_IDE_PATH /tools-builder/arduino-preprocessor/$preprocessor_version "
33+ args+=" ${win_opts} "
34+ fi
35+ ${BUILD_SKETCH} ${args}
3636 done
3737 fi
3838}
Original file line number Diff line number Diff line change @@ -24,18 +24,14 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
2424 shift
2525 target=$1
2626 ;;
27- -s )
28- shift
29- sketchdir=$1
30- ;;
31- -w )
32- shift
33- win_opts=$1
34- ;;
3527 -fqbn )
3628 shift
3729 fqbn=$1
3830 ;;
31+ -s )
32+ shift
33+ sketchdir=$1
34+ ;;
3935 -ff )
4036 shift
4137 ff_opt=$1
@@ -139,7 +135,8 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
139135 rm -rf " $build_dir$i "
140136 mkdir -p " $build_dir$i "
141137 currfqbn=` echo $fqbn | jq -r --argjson i $i ' .[$i]' `
142- echo " Building with FQBN=$currfqbn "
138+ sketchname=$( basename $sketchdir )
139+ echo " Building $sketchname with FQBN=$currfqbn "
143140 $ide_path /arduino-builder -compile -logger=human -core-api-version=10810 \
144141 -fqbn=\" $currfqbn \" \
145142 -warnings=" all" \
@@ -151,7 +148,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
151148 -libraries " $user_path /libraries" \
152149 -build-cache " $ARDUINO_CACHE_DIR " \
153150 -build-path " $build_dir$i " \
154- $win_opts $ xtra_opts " ${sketchdir} /$( basename ${sketchdir} ) .ino"
151+ $xtra_opts " ${sketchdir} /${sketchname} .ino"
155152 done
156153}
157154
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ function run_test() {
66 local options=$3
77 local erase_flash=$4
88 local sketchdir=$( dirname $sketch )
9- local sketchdirname =$( basename $sketchdir )
9+ local sketchname =$( basename $sketchdir )
1010
1111 if [ $options -eq 0 ] && [ -f $sketchdir /cfg.json ]; then
1212 len=` jq -r --arg chip $target ' .targets[] | select(.name==$chip) | .fqbn | length' $sketchdir /cfg.json`
@@ -16,12 +16,12 @@ function run_test() {
1616
1717 for i in ` seq 0 $(( $len - 1 )) `
1818 do
19- echo " Running test: $sketchdirname -- Config: $i "
19+ echo " Running test: $sketchname -- Config: $i "
2020 if [ $erase_flash -eq 1 ]; then
2121 esptool.py -c $target erase_flash
2222 fi
2323
24- pytest tests --build-dir tests/$sketchdirname /build$i -k test_$sketchdirname --junit-xml=tests/$sketchdirname / $sketchdirname $i .xml
24+ pytest tests --build-dir tests/$sketchname /build$i -k test_$sketchname --junit-xml=tests/$sketchname / $sketchname $i .xml
2525 result=$?
2626 if [ $result -ne 0 ]; then
2727 return $result
You can’t perform that action at this time.
0 commit comments