tests: move the test case execution into a separate function
tests: move the test case execution into a separate function

For better readability move the code executing the test case into a
separate function - between the setup and teardown routines.

Signed-off-by: Bartosz Golaszewski <108de5fbc428215dc26df4468b48691526611148@gmail.com>

brgl/libgpiod,brgl/libgpiod,brgl/libgpiod,brgl/libgpiod