Skip to content

Commit

Permalink
Collect xml test logs and produce a summary.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Sauer committed Feb 7, 2024
1 parent b7baa7c commit 476ce1e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ jobs:
cat ./bt_edit.log ./test-suite.log
scripts/gdbtests.sh ./test-suite.log
- uses: test-summary/action@v2
if: always()
with:
paths: |
/tmp/*.log.xml
- uses: actions/upload-artifact@v4
if: always() && steps.check.outcome == 'failure' && steps.rerun_tests.outcome == 'success'
with:
Expand Down
8 changes: 6 additions & 2 deletions tests/bt-check.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,11 @@ setup_log_base (gint argc, gchar ** argv)
// get basename from argv[0]; -> lt-bt_edit
if ((log = g_path_get_basename (argv[0]))) {
// cut libtool prefix
__log_base = g_strdup (&log[3]);
if (!strncmp (log, "lt-", 3)) {
__log_base = g_strdup (&log[3]);
} else {
__log_base = g_strdup (log);
}
g_free (log);
} else {
fprintf (stderr, "can't get basename from: '%s'\n", argv[0]);
Expand Down Expand Up @@ -544,7 +548,7 @@ get_suite_log_filename (void)
{
static gchar suite_log_fn[PATH_MAX];

sprintf (suite_log_fn, "%s" G_DIR_SEPARATOR_S "log.xml", __log_suite);
sprintf (suite_log_fn, "%s.log.xml", __log_suite);
return suite_log_fn;
}

Expand Down

0 comments on commit 476ce1e

Please sign in to comment.