Skip to content

Commit

Permalink
test: only display number of devices once
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelP committed Aug 17, 2021
1 parent 728ded7 commit 49a829d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/arvtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,11 +731,8 @@ arv_test_run (ArvTest *test)

g_return_val_if_fail (ARV_IS_TEST (test), FALSE);

arv_update_device_list ();
n_devices = arv_get_n_devices ();

printf ("Found %d device%s\n", n_devices, n_devices > 1 ? "s" : "");

for (i = 0; i < n_devices; i++) {
const char *camera_id = arv_get_device_id (i);

Expand Down Expand Up @@ -811,6 +808,7 @@ main (int argc, char **argv)
ArvTest *test = NULL;
gboolean success = TRUE;
int i;
int n_devices;

context = g_option_context_new (NULL);
g_option_context_add_main_entries (context, arv_option_entries, NULL);
Expand All @@ -833,6 +831,11 @@ main (int argc, char **argv)

test = arv_test_new (arv_option_camera_selection, arv_option_test_selection);

arv_update_device_list ();
n_devices = arv_get_n_devices ();

printf ("Found %d device%s\n", n_devices, n_devices > 1 ? "s" : "");

for (i = 0; i < arv_option_n_iterations; i++) {
if (!arv_test_run (test))
success = FALSE;
Expand Down

0 comments on commit 49a829d

Please sign in to comment.