Skip to content

Commit 2879987

Browse files
committed
Test
1 parent d698082 commit 2879987

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

.github/scripts/sketch_utils.sh

+9-9
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
7878

7979
# Default FQBN options if none were passed in the command line.
8080

81-
esp32_opts="PSRAM=enabled,PartitionScheme=huge_app"
81+
esp32_opts="FlashMode=dio,PSRAM=enabled,PartitionScheme=huge_app"
8282
esp32s2_opts="PSRAM=enabled,PartitionScheme=huge_app"
8383
esp32s3_opts="PSRAM=opi,USBMode=default,PartitionScheme=huge_app"
84-
esp32c3_opts="PartitionScheme=huge_app"
84+
esp32c3_opts="FlashMode=dio,PartitionScheme=huge_app"
8585
esp32c6_opts="PartitionScheme=huge_app"
8686
esp32h2_opts="PartitionScheme=huge_app"
8787

@@ -139,7 +139,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
139139
echo "Skipping $sketchname for target $target"
140140
exit 0
141141
fi
142-
142+
143143
ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
144144
if [ -n "$ARDUINO_BUILD_DIR" ]; then
145145
build_dir="$ARDUINO_BUILD_DIR"
@@ -177,7 +177,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
177177
--build-path "$build_dir" \
178178
$xtra_opts "${sketchdir}" \
179179
> $output_file
180-
180+
181181
exit_status=$?
182182
if [ $exit_status -ne 0 ]; then
183183
echo ""ERROR: Compilation failed with error code $exit_status""
@@ -198,11 +198,11 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
198198
# Extract the desired substring using sed
199199
lib_sketch_name=$(echo "$directory_path" | sed "s|$constant_part||")
200200
#append json file where key is fqbn, sketch name, sizes -> extracted values
201-
echo "{\"name\": \"$lib_sketch_name\",
201+
echo "{\"name\": \"$lib_sketch_name\",
202202
\"sizes\": [{
203-
\"flash_bytes\": $flash_bytes,
204-
\"flash_percentage\": $flash_percentage,
205-
\"ram_bytes\": $ram_bytes,
203+
\"flash_bytes\": $flash_bytes,
204+
\"flash_percentage\": $flash_percentage,
205+
\"ram_bytes\": $ram_bytes,
206206
\"ram_percentage\": $ram_percentage
207207
}]
208208
}," >> "$sizes_file"
@@ -386,7 +386,7 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
386386
if [ $log_compilation ]; then
387387
#echo board,target and start of sketches to sizes_file json
388388
echo "{ \"board\": \"$fqbn\",
389-
\"target\": \"$target\",
389+
\"target\": \"$target\",
390390
\"sketches\": [" >> "$sizes_file"
391391
fi
392392

.github/scripts/tests_run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function run_test() {
5656
fi
5757

5858
echo "pytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args"
59-
pytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args
59+
bash -c "pytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args"
6060
result=$?
6161
if [ $result -ne 0 ]; then
6262
return $result

platform.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,6 @@ recipe.objcopy.bin.pattern_args=--chip {build.mcu} elf2image --flash_mode "{buil
160160
recipe.objcopy.bin.pattern="{tools.esptool_py.path}/{tools.esptool_py.cmd}" {recipe.objcopy.bin.pattern_args}
161161
recipe.objcopy.bin.pattern.linux=python3 "{tools.esptool_py.path}/{tools.esptool_py.cmd}" {recipe.objcopy.bin.pattern_args}
162162

163-
## Create qemu_flash_args file
164-
qemu_flash_args.path={build.path}/qemu_flash_args
165-
recipe.objcopy.qemu_flash_args.pattern=/usr/bin/env bash -c "(echo '--fill-flash-size {build.flash_size} --flash_mode keep --flash_freq keep --flash_size keep'; echo '{build.bootloader_addr} {build.path}/{build.project_name}.bootloader.bin'; echo '0x8000 {build.path}/{build.project_name}.partitions.bin'; echo '0xe000 {runtime.platform.path}/tools/partitions/boot_app0.bin'; echo '0x10000 {build.path}/{build.project_name}.bin') > {qemu_flash_args.path}"
166-
167163
## Create Insights Firmware Package
168164
recipe.hooks.objcopy.postobjcopy.1.pattern_args={build.path} {build.project_name} "{build.source.path}"
169165
recipe.hooks.objcopy.postobjcopy.1.pattern=/usr/bin/env bash -c "[ ! -d "{build.path}"/libraries/Insights ] || {tools.gen_insights_pkg.cmd} {recipe.hooks.objcopy.postobjcopy.1.pattern_args}"
@@ -173,6 +169,12 @@ recipe.hooks.objcopy.postobjcopy.1.pattern.windows=cmd /c if exist "{build.path}
173169
recipe.hooks.objcopy.postobjcopy.2.pattern=/usr/bin/env bash -c "[ ! -d "{build.path}"/libraries/ESP_SR ] || [ ! -f "{compiler.sdk.path}"/esp_sr/srmodels.bin ] || cp -f "{compiler.sdk.path}"/esp_sr/srmodels.bin "{build.path}"/srmodels.bin"
174170
recipe.hooks.objcopy.postobjcopy.2.pattern.windows=cmd /c if exist "{build.path}\libraries\ESP_SR" if exist "{compiler.sdk.path}\esp_sr\srmodels.bin" COPY /y "{compiler.sdk.path}\esp_sr\srmodels.bin" "{build.path}\srmodels.bin"
175171

172+
## Create qemu_flash_args file
173+
qemu_flash_args.path={build.path}/qemu_flash_args
174+
recipe.hooks.objcopy.postobjcopy.3.pattern_args=(echo '--fill-flash-size {build.flash_size} --flash_mode keep --flash_freq keep --flash_size keep'; echo '{build.bootloader_addr} {build.path}/{build.project_name}.bootloader.bin'; echo '0x8000 {build.path}/{build.project_name}.partitions.bin'; echo '0xe000 {runtime.platform.path}/tools/partitions/boot_app0.bin'; echo '0x10000 {build.path}/{build.project_name}.bin') > {qemu_flash_args.path}
175+
recipe.hooks.objcopy.postobjcopy.3.pattern=/usr/bin/env bash -c "{recipe.hooks.objcopy.postobjcopy.3.pattern_args}"
176+
recipe.hooks.objcopy.postobjcopy.3.pattern.windows=cmd /c "{recipe.hooks.objcopy.postobjcopy.3.pattern_args}"
177+
176178
## Save bin
177179
recipe.output.tmp_file={build.project_name}.bin
178180
recipe.output.save_file={build.project_name}.{build.variant}.bin

tests/democfg/.skip.qemu

Whitespace-only changes.

tests/nvs/.skip.qemu

Whitespace-only changes.

0 commit comments

Comments
 (0)