Skip to content

Commit 025c94c

Browse files
committed
Use target subfolders
1 parent afdcb98 commit 025c94c

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

Diff for: .github/scripts/sketch_utils.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ function build_sketch { # build_sketch <ide_path> <user_path> <path-to-ino> [ext
244244
build_dir="$ARDUINO_BUILD_DIR"
245245
elif [ "$len" -eq 1 ]; then
246246
# build_dir="$sketchdir/build"
247-
build_dir="$HOME/.arduino/tests/$sketchname/build.tmp"
247+
build_dir="$HOME/.arduino/tests/$sketchname/$target/build.tmp"
248248
fi
249249

250250
output_file="$HOME/.arduino/cli_compile_output.txt"
@@ -254,7 +254,7 @@ function build_sketch { # build_sketch <ide_path> <user_path> <path-to-ino> [ext
254254
for i in $(seq 0 $((len - 1))); do
255255
if [ "$len" -ne 1 ]; then
256256
# build_dir="$sketchdir/build$i"
257-
build_dir="$HOME/.arduino/tests/$sketchname/build$i.tmp"
257+
build_dir="$HOME/.arduino/tests/$sketchname/$target/build$i.tmp"
258258
fi
259259
rm -rf "$build_dir"
260260
mkdir -p "$build_dir"

Diff for: .github/scripts/tests_run.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ function run_test {
2727
fi
2828

2929
if [ "$len" -eq 1 ]; then
30-
sdkconfig_path="$HOME/.arduino/tests/$sketchname/build.tmp/sdkconfig"
30+
sdkconfig_path="$HOME/.arduino/tests/$sketchname/$target/build.tmp/sdkconfig"
3131
else
32-
sdkconfig_path="$HOME/.arduino/tests/$sketchname/build0.tmp/sdkconfig"
32+
sdkconfig_path="$HOME/.arduino/tests/$sketchname/$target/build0.tmp/sdkconfig"
3333
fi
3434

3535
if [ -f "$sketchdir"/ci.json ]; then
@@ -60,7 +60,7 @@ function run_test {
6060

6161
if [ "$len" -eq 1 ]; then
6262
# build_dir="$sketchdir/build"
63-
build_dir="$HOME/.arduino/tests/$sketchname/build.tmp"
63+
build_dir="$HOME/.arduino/tests/$sketchname/$target/build.tmp"
6464
report_file="$sketchdir/$target/$sketchname.xml"
6565
fi
6666

@@ -83,7 +83,7 @@ function run_test {
8383

8484
if [ "$len" -ne 1 ]; then
8585
# build_dir="$sketchdir/build$i"
86-
build_dir="$HOME/.arduino/tests/$sketchname/build$i.tmp"
86+
build_dir="$HOME/.arduino/tests/$sketchname/$target/build$i.tmp"
8787
report_file="$sketchdir/$target/$sketchname$i.xml"
8888
fi
8989

Diff for: .github/workflows/tests_build.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
with:
2727
key: tests-${{ env.id }}-bin
2828
path: |
29-
~/.arduino/tests/**/build*.tmp/*.bin
30-
~/.arduino/tests/**/build*.tmp/*.elf
31-
~/.arduino/tests/**/build*.tmp/*.json
32-
~/.arduino/tests/**/build*.tmp/sdkconfig
29+
~/.arduino/tests/**/${{ inputs.chip }}/build*.tmp/*.bin
30+
~/.arduino/tests/**/${{ inputs.chip }}/build*.tmp/*.elf
31+
~/.arduino/tests/**/${{ inputs.chip }}/build*.tmp/*.json
32+
~/.arduino/tests/**/${{ inputs.chip }}/build*.tmp/sdkconfig
3333
3434
- name: Evaluate if tests should be built
3535
id: check-build
@@ -73,18 +73,18 @@ jobs:
7373
with:
7474
key: tests-${{ env.id }}-bin
7575
path: |
76-
~/.arduino/tests/**/build*.tmp/*.bin
77-
~/.arduino/tests/**/build*.tmp/*.elf
78-
~/.arduino/tests/**/build*.tmp/*.json
79-
~/.arduino/tests/**/build*.tmp/sdkconfig
76+
~/.arduino/tests/**/${{ inputs.chip }}/build*.tmp/*.bin
77+
~/.arduino/tests/**/${{ inputs.chip }}/build*.tmp/*.elf
78+
~/.arduino/tests/**/${{ inputs.chip }}/build*.tmp/*.json
79+
~/.arduino/tests/**/${{ inputs.chip }}/build*.tmp/sdkconfig
8080
8181
- name: Upload ${{ inputs.chip }} ${{ inputs.type }} binaries as artifacts
8282
uses: actions/upload-artifact@v4
8383
with:
8484
name: tests-bin-${{ inputs.chip }}-${{ inputs.type }}
8585
overwrite: true
8686
path: |
87-
~/.arduino/tests/**/build*.tmp/*.bin
88-
~/.arduino/tests/**/build*.tmp/*.elf
89-
~/.arduino/tests/**/build*.tmp/*.json
90-
~/.arduino/tests/**/build*.tmp/sdkconfig
87+
~/.arduino/tests/**/${{ inputs.chip }}/build*.tmp/*.bin
88+
~/.arduino/tests/**/${{ inputs.chip }}/build*.tmp/*.elf
89+
~/.arduino/tests/**/${{ inputs.chip }}/build*.tmp/*.json
90+
~/.arduino/tests/**/${{ inputs.chip }}/build*.tmp/sdkconfig

Diff for: docs/en/contributing.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ ESP32-C3 target, you would run:
318318
319319
./.github/scripts/tests_build.sh -s uart -t esp32c3
320320
321-
You should see the output of the build process and the test binary should be generated in the ``~/.arduino/tests/<test_name>/build.tmp`` folder.
321+
You should see the output of the build process and the test binary should be generated in the ``~/.arduino/tests/<test_name>/<target_chip>/build.tmp`` folder.
322322

323323
Now that the test is built, you can run it in the target board. Connect the target board to your computer and run:
324324

@@ -339,7 +339,7 @@ The test will run on the target board and you should see the output of the test
339339
lucassvaz@Lucas--MacBook-Pro esp32 % ./.github/scripts/tests_run.sh -s uart -t esp32c3
340340
Sketch uart test type: validation
341341
Running test: uart -- Config: Default
342-
pytest tests --build-dir /Users/lucassvaz/.arduino/tests/uart/build.tmp -k test_uart --junit-xml=/Users/lucassvaz/Espressif/Arduino/hardware/espressif/esp32/tests/validation/uart/esp32c3/uart.xml --embedded-services esp,arduino
342+
pytest tests --build-dir /Users/lucassvaz/.arduino/tests/uart/esp32c3/build.tmp -k test_uart --junit-xml=/Users/lucassvaz/Espressif/Arduino/hardware/espressif/esp32/tests/validation/uart/esp32c3/uart.xml --embedded-services esp,arduino
343343
=============================================================================================== test session starts ================================================================================================
344344
platform darwin -- Python 3.12.3, pytest-8.2.2, pluggy-1.5.0
345345
rootdir: /Users/lucassvaz/Espressif/Arduino/hardware/espressif/esp32/tests

0 commit comments

Comments
 (0)