diff options
author | L. E. Segovia <amy@centricular.com> | 2023-12-01 11:31:07 -0300 |
---|---|---|
committer | L. E. Segovia <amy@centricular.com> | 2023-12-07 13:17:01 -0300 |
commit | 4b51b463e188886124fb91efd07512af88a8ecc4 (patch) | |
tree | a391dc72a17cf2973cdc5e7fc217185c188210a1 /testsuite | |
parent | f56b926213c13e821b58a5017a5a418847b4dfb1 (diff) |
test-schro: Also log test passes and failures here
Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/121>
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/test-schro.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/testsuite/test-schro.c b/testsuite/test-schro.c index 4530a39..22a06c8 100644 --- a/testsuite/test-schro.c +++ b/testsuite/test-schro.c @@ -12,6 +12,8 @@ int error = FALSE; +static int passed_tests = 0; +static int total_tests = 0; OrcProgram * get_program (int type) @@ -221,8 +223,18 @@ test_program (int type) orc_program_set_name (p, s); ret = orc_test_compare_output (p); - if (!ret) { + total_tests++; + + if (ret == ORC_TEST_INDETERMINATE) { + printf (" %24s: compiled function: COMPILE FAILED (%s)\n", p->name, + p->error_msg); + passed_tests++; + } else if (!ret) { error = TRUE; + printf (" %24s: compiled function: FAILED\n", p->name); + } else { + printf (" %24s: compiled function: PASSED\n", p->name); + passed_tests++; } orc_program_free (p); @@ -244,6 +256,9 @@ main (int argc, char *argv[]) test_program (i); } + printf ("Result: %d/%d tests passed, %f%%", passed_tests, total_tests, + passed_tests * 100.f / total_tests); + if (error) return 1; return 0; } |