test_apps_example

Example of the component espressif/eth_test_app v0.3.0
# eth_test_app example

Minimal ESP-IDF test project that runs the **eth_test_app** Ethernet test suite (Ethernet apps, L2, heap allocation) via [`EthTestRunner`](../eth_test_runner.py). Use it as a **starting point when adding tests for a specific PHY chip**.

## Create a new test project from this example

1) From your driver repo (or any IDF project directory):

```bash
idf.py create-project-from-example "espressif/eth_test_app=*:test_apps_example"
```

2) Open the created project and:

- Rename `pytest_ethernet.py` to the chip-under-test name (e.g. `pytest_dm9051.py`).
- Set **TEST_IF** in `pytest_ethernet.py` – host Ethernet interface for L2/heap tests (`ip -c a` to list) or keep empty.
- Set **config** and **pytest marks** – the sdkconfig preset and PHY marker for your chip (e.g. `pytest.mark.eth_dm9051`, `pytest.mark.eth_ip101`).
- Reconfigure `sdkconfig.ci.default` to align with hardware setup and Ethernet chip under test needs, see [Chip-Specific Configuration](../README.md#chip-specific-configuration) in upper level README.

See the `CONFIGURE FOR YOUR CHIP` block at the top of `pytest_ethernet.py` for details.

3) Run your test as:
```bash
pytest --target esp32
```
or
```bash
 pytest 'pytest_ethernet.py::test_eth_example[default-esp32]'
```

To create a project from this example, run:

idf.py create-project-from-example "espressif/eth_test_app=0.3.0:test_apps_example"

or download archive (~3.40 KB)