From 67d8c7c69164c48debffff6868c2dc9282ffc37b Mon Sep 17 00:00:00 2001 From: Keith Burzinski Date: Mon, 17 Jun 2024 02:14:19 -0500 Subject: [PATCH] [CI-a01nyub] Consolidate test files (#6917) --- tests/components/a01nyub/common.yaml | 11 +++++++++++ tests/components/a01nyub/test.esp32-c3-idf.yaml | 16 ++++------------ tests/components/a01nyub/test.esp32-c3.yaml | 16 ++++------------ tests/components/a01nyub/test.esp32-idf.yaml | 16 ++++------------ tests/components/a01nyub/test.esp32.yaml | 16 ++++------------ tests/components/a01nyub/test.esp8266.yaml | 16 ++++------------ tests/components/a01nyub/test.rp2040.yaml | 16 ++++------------ 7 files changed, 35 insertions(+), 72 deletions(-) create mode 100644 tests/components/a01nyub/common.yaml diff --git a/tests/components/a01nyub/common.yaml b/tests/components/a01nyub/common.yaml new file mode 100644 index 0000000000..0717acfff7 --- /dev/null +++ b/tests/components/a01nyub/common.yaml @@ -0,0 +1,11 @@ +uart: + - id: uart_a01nyub + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + +sensor: + - platform: a01nyub + id: a01nyub_sensor + name: a01nyub Distance + uart_id: uart_a01nyub diff --git a/tests/components/a01nyub/test.esp32-c3-idf.yaml b/tests/components/a01nyub/test.esp32-c3-idf.yaml index 3132f77136..b516342f3b 100644 --- a/tests/components/a01nyub/test.esp32-c3-idf.yaml +++ b/tests/components/a01nyub/test.esp32-c3-idf.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a01nyub - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: a01nyub - id: a01nyub_sensor - name: a01nyub Distance - uart_id: uart_a01nyub +<<: !include common.yaml diff --git a/tests/components/a01nyub/test.esp32-c3.yaml b/tests/components/a01nyub/test.esp32-c3.yaml index 3132f77136..b516342f3b 100644 --- a/tests/components/a01nyub/test.esp32-c3.yaml +++ b/tests/components/a01nyub/test.esp32-c3.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a01nyub - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: a01nyub - id: a01nyub_sensor - name: a01nyub Distance - uart_id: uart_a01nyub +<<: !include common.yaml diff --git a/tests/components/a01nyub/test.esp32-idf.yaml b/tests/components/a01nyub/test.esp32-idf.yaml index 79fc9c5fbf..f486544afa 100644 --- a/tests/components/a01nyub/test.esp32-idf.yaml +++ b/tests/components/a01nyub/test.esp32-idf.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a01nyub - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: a01nyub - id: a01nyub_sensor - name: a01nyub Distance - uart_id: uart_a01nyub +<<: !include common.yaml diff --git a/tests/components/a01nyub/test.esp32.yaml b/tests/components/a01nyub/test.esp32.yaml index 79fc9c5fbf..f486544afa 100644 --- a/tests/components/a01nyub/test.esp32.yaml +++ b/tests/components/a01nyub/test.esp32.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a01nyub - tx_pin: - number: 17 - rx_pin: - number: 16 - baud_rate: 9600 +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 -sensor: - - platform: a01nyub - id: a01nyub_sensor - name: a01nyub Distance - uart_id: uart_a01nyub +<<: !include common.yaml diff --git a/tests/components/a01nyub/test.esp8266.yaml b/tests/components/a01nyub/test.esp8266.yaml index 3132f77136..b516342f3b 100644 --- a/tests/components/a01nyub/test.esp8266.yaml +++ b/tests/components/a01nyub/test.esp8266.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a01nyub - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: a01nyub - id: a01nyub_sensor - name: a01nyub Distance - uart_id: uart_a01nyub +<<: !include common.yaml diff --git a/tests/components/a01nyub/test.rp2040.yaml b/tests/components/a01nyub/test.rp2040.yaml index 3132f77136..b516342f3b 100644 --- a/tests/components/a01nyub/test.rp2040.yaml +++ b/tests/components/a01nyub/test.rp2040.yaml @@ -1,13 +1,5 @@ -uart: - - id: uart_a01nyub - tx_pin: - number: 4 - rx_pin: - number: 5 - baud_rate: 9600 +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 -sensor: - - platform: a01nyub - id: a01nyub_sensor - name: a01nyub Distance - uart_id: uart_a01nyub +<<: !include common.yaml