Skip to content

Commit

Permalink
feat(test_esptool): Added test for embedded and detected flash size m…
Browse files Browse the repository at this point in the history
…atch
  • Loading branch information
jakub-kocka committed Dec 13, 2023
1 parent b8dd74d commit c0ea74a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/test_esptool.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,22 @@ def test_flash_id_trace(self):
assert "Manufacturer:" in res
assert "Device:" in res

@pytest.mark.quick_test
@pytest.mark.skipif(
arg_chip not in ["esp32c2"],
reason="This test make sense only for EPS32-C2",
)
def test_flash_size(self):
"""Test ESP32-C2 efuse block for flash size feature"""
# ESP32-C2 class inherits methods from ESP32-C3 class
# but it does not have the same amount of efuse blocks
# the methods are overwritten
# in case anything changes this test will fail to remind us
res = self.run_esptool("flash_id")
lines = res.splitlines()
for line in lines:
assert "embedded flash" not in line.lower()


@pytest.mark.skipif(
os.getenv("ESPTOOL_TEST_SPI_CONN") is None, reason="Needs external flash"
Expand Down

0 comments on commit c0ea74a

Please sign in to comment.