Skip to content

chore: small fixes - #424

Merged
hfudev merged 2 commits into
mainfrom
fix/small-fixes
Jun 30, 2026
Merged

chore: small fixes#424
hfudev merged 2 commits into
mainfrom
fix/small-fixes

Conversation

@hfudev

@hfudev hfudev commented Jun 17, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes small maintenance tweaks across the pytest-embedded plugin and repo tooling, aiming to improve typing/option handling and keep CI/dev tooling up to date.

Changes:

  • Add typing to pytest_addoption, normalize getoption() usage for target, and adjust session-finish exit status handling based on merged JUnit results.
  • Bump ruff-pre-commit hook version in .pre-commit-config.yaml.
  • Bump dawidd6/action-download-artifact version in the report workflow.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pytest-embedded/pytest_embedded/plugin.py Minor typing/option-access tweaks and modified session exit status escalation logic.
.pre-commit-config.yaml Updates Ruff pre-commit hook revision.
.github/workflows/report.yml Updates the artifact download action version used by the reporting workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pytest-embedded/pytest_embedded/plugin.py
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Title Coverage Tests Skipped Failures Errors Time
3.10 ARM64 Coverage 117 16 💤 0 ❌ 0 🔥 13m 3s ⏱️
Qemu Coverage 7 0 💤 0 ❌ 0 🔥 25.078s ⏱️
3.14 X64 Coverage 117 14 💤 0 ❌ 0 🔥 15m 48s ⏱️

@hfudev
hfudev force-pushed the fix/small-fixes branch from df6e5c6 to 46e7e9e Compare June 29, 2026 07:24
@hfudev

hfudev commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@lucasssvaz PTAL 4ed3b3e

otherwise the test_pexpect_by_wokwi_esp32_arduino test case would fail

@hfudev

hfudev commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@lucasssvaz PTAL 4ed3b3e

otherwise the test_pexpect_by_wokwi_esp32_arduino test case would fail

.. no, test_arduino_serial_flash is failing now with this commit. could you show me how to fix it?

@lucasssvaz

Copy link
Copy Markdown
Member

@hfudev the test can use either the merged or the app only bin. Testing locally this patch fixes it. Can you confirm ?

diff --git a/pytest-embedded-arduino/pytest_embedded_arduino/app.py b/pytest-embedded-arduino/pytest_embedded_arduino/app.py
index 025052b..bb75748 100644
--- a/pytest-embedded-arduino/pytest_embedded_arduino/app.py
+++ b/pytest-embedded-arduino/pytest_embedded_arduino/app.py
@@ -19,7 +19,8 @@ class ArduinoApp(App):
         flash_settings (dict[str, str]): Flash settings for the target.
         flash_files (list[tuple[str, str]]): ``(address, filepath)`` pairs parsed
             from ``flash_args``.  Each filepath is absolute.
-        binary_file (str): Merged binary file path.
+        binary_file (str): Application binary file path (``.ino.merged.bin`` if present,
+            otherwise ``.ino.bin``).
         elf_file (str): ELF file path.
     """
 
diff --git a/pytest-embedded-arduino/tests/test_arduino.py b/pytest-embedded-arduino/tests/test_arduino.py
index 8b4c3bb..6bac687 100644
--- a/pytest-embedded-arduino/tests/test_arduino.py
+++ b/pytest-embedded-arduino/tests/test_arduino.py
@@ -2,7 +2,10 @@ import os
 
 
 def test_arduino_serial_flash(testdir):
-    bin_path = os.path.join(testdir.tmpdir, 'hello_world_arduino', 'build', 'hello_world_arduino.ino.merged.bin')
+    build_dir = os.path.join(testdir.tmpdir, 'hello_world_arduino', 'build')
+    merged_bin = os.path.join(build_dir, 'hello_world_arduino.ino.merged.bin')
+    ino_bin = os.path.join(build_dir, 'hello_world_arduino.ino.bin')
+    bin_path = merged_bin if os.path.exists(merged_bin) else ino_bin
 
     testdir.makepyfile(f"""
         import pexpect

@hfudev
hfudev force-pushed the fix/small-fixes branch from 4ed3b3e to 4f4d713 Compare June 30, 2026 11:34
@hfudev

hfudev commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

thank you @lucasssvaz

@hfudev
hfudev merged commit eebeb04 into main Jun 30, 2026
6 checks passed
@hfudev
hfudev deleted the fix/small-fixes branch June 30, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants