Skip to content

Commit

Permalink
Try tap format for logs.
Browse files Browse the repository at this point in the history
Libcheck has a different xml format that what I could find on the github
action side. Tap is simpler, but more common.
  • Loading branch information
Stefan Sauer committed Feb 9, 2024
1 parent d33c4da commit 088ae66
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 11 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -61,6 +62,7 @@ jobs:
*.log
!config.log
tests/*.log
tap_summary.md
bml.tar.bz2
bt_cmd.tar.bz2
bt_core.tar.bz2
Expand Down
4 changes: 2 additions & 2 deletions tests/bt-check.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/bt-check.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion tests/m-bml.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion tests/m-bt-cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion tests/m-bt-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion tests/m-bt-edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion tests/m-bt-gst.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion tests/m-bt-ic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 088ae66

Please sign in to comment.