From 088ae666ad3323ac78b6691c3018af2b855aae12 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Fri, 9 Feb 2024 19:56:01 +0100 Subject: [PATCH] Try tap format for logs. Libcheck has a different xml format that what I could find on the github action side. Tap is simpler, but more common. --- .github/workflows/build.yml | 6 ++++-- tests/bt-check.c | 4 ++-- tests/bt-check.h | 2 +- tests/m-bml.c | 3 ++- tests/m-bt-cmd.c | 3 ++- tests/m-bt-core.c | 3 ++- tests/m-bt-edit.c | 3 ++- tests/m-bt-gst.c | 3 ++- tests/m-bt-ic.c | 3 ++- 9 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 762ab0570..1c2c3466c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,11 +48,12 @@ jobs: cat ./bt_edit.log ./test-suite.log scripts/gdbtests.sh ./test-suite.log - - uses: test-summary/action@v2 + - uses: pcolby/tap-summary@v1 if: always() with: paths: | - /tmp/*.log.xml + /tmp/*.log.tap + summary-file: tap_summary.md - uses: actions/upload-artifact@v4 if: always() && steps.check.outcome == 'failure' && steps.rerun_tests.outcome == 'success' @@ -61,6 +62,7 @@ jobs: *.log !config.log tests/*.log + tap_summary.md bml.tar.bz2 bt_cmd.tar.bz2 bt_core.tar.bz2 diff --git a/tests/bt-check.c b/tests/bt-check.c index cfc8fe0d8..4744c9d0c 100644 --- a/tests/bt-check.c +++ b/tests/bt-check.c @@ -544,11 +544,11 @@ get_suite_log_base (void) } const gchar * -get_suite_log_filename (void) +get_suite_log_filename (const gchar *ext) { static gchar suite_log_fn[PATH_MAX]; - sprintf (suite_log_fn, "%s.log.xml", __log_suite); + sprintf (suite_log_fn, "%s.log.%s", __log_suite, ext); return suite_log_fn; } diff --git a/tests/bt-check.h b/tests/bt-check.h index a9adfd860..13a86734f 100644 --- a/tests/bt-check.h +++ b/tests/bt-check.h @@ -227,7 +227,7 @@ void setup_log_test(const gchar * func_name, gint i); void setup_log_capture(void); void collect_logs(gboolean no_failures); const gchar *get_suite_log_base(void); -const gchar *get_suite_log_filename(void); +const gchar *get_suite_log_filename (const gchar *ext); void check_run_main_loop_for_usec(gulong usec); gboolean check_run_main_loop_until_msg_or_error(BtSong * song, const gchar * msg); diff --git a/tests/m-bml.c b/tests/m-bml.c index 523281e73..cf395e8f4 100644 --- a/tests/m-bml.c +++ b/tests/m-bml.c @@ -37,7 +37,8 @@ main (gint argc, gchar ** argv) sr = srunner_create (bml_core_suite ()); srunner_add_suite (sr, bml_class_suite ()); - srunner_set_xml (sr, get_suite_log_filename ()); + // srunner_set_xml (sr, get_suite_log_filename ("xml")); + srunner_set_tap (sr, get_suite_log_filename ("tap")); srunner_run_all (sr, CK_NORMAL); nf = srunner_ntests_failed (sr); srunner_free (sr); diff --git a/tests/m-bt-cmd.c b/tests/m-bt-cmd.c index 83549e357..4fe2295ea 100644 --- a/tests/m-bt-cmd.c +++ b/tests/m-bt-cmd.c @@ -52,7 +52,8 @@ main (gint argc, gchar ** argv) "music production environment / command ui"); sr = srunner_create (bt_cmd_application_suite ()); - srunner_set_xml (sr, get_suite_log_filename ()); + // srunner_set_xml (sr, get_suite_log_filename ("xml")); + srunner_set_tap (sr, get_suite_log_filename ("tap")); srunner_run_all (sr, CK_NORMAL); nf = srunner_ntests_failed (sr); srunner_free (sr); diff --git a/tests/m-bt-core.c b/tests/m-bt-core.c index 6000992ec..e57f19479 100644 --- a/tests/m-bt-core.c +++ b/tests/m-bt-core.c @@ -98,7 +98,8 @@ main (gint argc, gchar ** argv) srunner_add_suite (sr, bt_wave_suite ()); srunner_add_suite (sr, bt_wave_table_suite ()); srunner_add_suite (sr, bt_wire_suite ()); - srunner_set_xml (sr, get_suite_log_filename ()); + // srunner_set_xml (sr, get_suite_log_filename ("xml")); + srunner_set_tap (sr, get_suite_log_filename ("tap")); srunner_run_all (sr, CK_NORMAL); nf = srunner_ntests_failed (sr); srunner_free (sr); diff --git a/tests/m-bt-edit.c b/tests/m-bt-edit.c index cd03df5b4..31489f35c 100644 --- a/tests/m-bt-edit.c +++ b/tests/m-bt-edit.c @@ -216,7 +216,8 @@ main (gint argc, gchar ** argv) srunner_add_suite (sr, bt_wave_list_model_suite ()); srunner_add_suite (sr, bt_wavelevel_list_model_suite ()); srunner_add_suite (sr, bt_wire_canvas_item_suite ()); - srunner_set_xml (sr, get_suite_log_filename ()); + // srunner_set_xml (sr, get_suite_log_filename ("xml")); + srunner_set_tap (sr, get_suite_log_filename ("tap")); srunner_run_all (sr, CK_NORMAL); nf = srunner_ntests_failed (sr); srunner_free (sr); diff --git a/tests/m-bt-gst.c b/tests/m-bt-gst.c index b111b5c32..4dff7dd06 100644 --- a/tests/m-bt-gst.c +++ b/tests/m-bt-gst.c @@ -62,7 +62,8 @@ main (gint argc, gchar ** argv) srunner_add_suite (sr, gst_buzztrax_osc_wave_suite ()); srunner_add_suite (sr, gst_buzztrax_tempo_suite ()); srunner_add_suite (sr, gst_buzztrax_toneconversion_suite ()); - srunner_set_xml (sr, get_suite_log_filename ()); + // srunner_set_xml (sr, get_suite_log_filename ("xml")); + srunner_set_tap (sr, get_suite_log_filename ("tap")); srunner_run_all (sr, CK_NORMAL); nf = srunner_ntests_failed (sr); srunner_free (sr); diff --git a/tests/m-bt-ic.c b/tests/m-bt-ic.c index 1d7d785b4..c4285c449 100644 --- a/tests/m-bt-ic.c +++ b/tests/m-bt-ic.c @@ -60,7 +60,8 @@ main (gint argc, gchar ** argv) #if USE_ALSA srunner_add_suite (sr, bt_aseq_discoverer_suite ()); #endif - srunner_set_xml (sr, get_suite_log_filename ()); + // srunner_set_xml (sr, get_suite_log_filename ("xml")); + srunner_set_tap (sr, get_suite_log_filename ("tap")); srunner_run_all (sr, CK_NORMAL); nf = srunner_ntests_failed (sr); srunner_free (sr);