flatpak: add helpers to locate flatpak installation debug dirs

The goal here is to be able to locate all of the debug directories for
active flatpak runtimes so that we can possibly decode debug libraries
from them (after verifying build-id/CRC).
This commit is contained in:
Christian Hergert
2019-08-02 18:15:02 -07:00
parent 0c3f2df42b
commit aad61d52f3
5 changed files with 186 additions and 0 deletions

View File

@ -50,6 +50,13 @@ test_mountinfo = executable('test-mountinfo',
dependencies: test_deps,
)
test_flatpak = executable('test-flatpak',
[ 'test-flatpak.c',
'../libsysprof/sysprof-flatpak.c'],
c_args: test_cflags,
dependencies: test_deps,
)
if get_option('enable_gtk')

13
src/tests/test-flatpak.c Normal file
View File

@ -0,0 +1,13 @@
#include "sysprof-flatpak.h"
gint
main (gint argc,
gchar *argv[])
{
g_auto(GStrv) debug_dirs = sysprof_flatpak_debug_dirs ();
for (guint i = 0; debug_dirs[i]; i++)
g_print ("%s\n", debug_dirs[i]);
return 0;
}