Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added skip_if_soc marker for idf target #327

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

horw
Copy link
Member

@horw horw commented Dec 23, 2024

Description

This PR introduces a skip_if_soc marker that helps filter targets based on their SOC_CAPS.h attributes.

Related

Closes #326

Testing


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@horw horw force-pushed the feat/skip_if_soc_marker branch 2 times, most recently from f1e6965 to 4a19463 Compare December 24, 2024 03:54
@horw horw force-pushed the feat/skip_if_soc_marker branch from 4a19463 to f5e1dd5 Compare December 24, 2024 04:01
@@ -33,6 +33,7 @@ requires-python = ">=3.7"
dependencies = [
"pytest-embedded~=1.12.1",
"esp-idf-panic-decoder",
"idf-build-apps~=2.5.3"
Copy link
Member

Choose a reason for hiding this comment

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

This additional dependency is a bit annoying, because:

  • pytest-embedded version usually changes depending on IDF version (due to constraint files)
  • at the same time, we try to keep idf-build-apps version the same for a long time, building the component with multiple IDF versions

So if in the future we have:

  • IDF 6.0, which forces pytest-embedded>=2, which requires idf-build-apps>=3
  • IDF 5.5, which forces pytest-embedded<2, which requires idf-build-apps<3

then we can't have a single version of idf-build-apps which satisfies both versions of IDF.

If you just need the "if_parser" functionality, can we split it into a separate pypi package?

import pytest
from idf_build_apps.constants import SUPPORTED_TARGETS

@pytest.mark.skip_if_soc("SOC_ULP_LP_UART_SUPPORTED == 1")
Copy link
Member

Choose a reason for hiding this comment

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

Are more complex conditions supported, or do we have the same limitation as in idf-build-apps, where we can't write A == 1 or B == 2 or C == 3?

Copy link
Member

Choose a reason for hiding this comment

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

good point. I'll fix this limitation together while moving the if parser to a separate package.

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.

[idf] Support Skip Marker for ESP-IDF Soc Caps (RDT-1055)
3 participants