Hi Inès,

On 26/1/24 20:31, Inès Varhol wrote:
`test_dm163_bank()`
Checks that the pin "sout" of the DM163 led driver outputs the values
received on pin "sin" with the expected latency (depending on the bank).

`test_dm163_gpio_connection()`
Check that changes to relevant STM32L4x5 GPIO pins are prpagated to the
DM163 device.

Signed-off-by: Arnaud Minier <arnaud.min...@telecom-paris.fr>
Signed-off-by: Inès Varhol <ines.var...@telecom-paris.fr>
---
  tests/qtest/dm163-test.c | 192 +++++++++++++++++++++++++++++++++++++++
  tests/qtest/meson.build  |   1 +
  2 files changed, 193 insertions(+)
  create mode 100644 tests/qtest/dm163-test.c


+static void test_dm163_gpio_connection(void)
+{
+    QTestState *qts = qtest_init("-M b-l475e-iot01a");

This machine is only available in ARM binaries, ...

+}
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_data_func("/dm163/bank0", (void *)0, test_dm163_bank);
+    qtest_add_data_func("/dm163/bank1", (void *)1, test_dm163_bank);
+    qtest_add_func("/dm163/gpio_connection", test_dm163_gpio_connection);
+    return g_test_run();
+}
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 5692da4fc1..e9f6ac46ef 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -22,6 +22,7 @@ qtests_generic = [
    'qos-test',
    'readconfig-test',
    'netdev-socket',
+  'dm163-test',
... so I'd expect the test to be restricted to ARM & DM163
availability:

-- >8 --
@@ -206,2 +206,3 @@ qtests_stm32l4x5 = \
 qtests_arm = \
+  (config_all_devices.has_key('CONFIG_DM163') ? ['dm163-test'] : []) + \
(config_all_devices.has_key('CONFIG_MPS2') ? ['sse-timer-test'] : []) + \
---

BTW please consider enabling scripts/git.orderfile to ease reviewing
your series :)

Regards,

Phil.

Reply via email to