[sysprof: 5/63] tests: Add missing dependency on glib-2.0



commit d1a8dc40f5264067351493b98cd1d37803b43c09
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Jun 30 16:23:50 2020 +0100

    tests: Add missing dependency on glib-2.0
    
    It has previously been implicitly pulled in by libsysprof-capture, but
    that will change in future.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    Helps: #40

 src/tests/cross-thread-frees.c      |  1 +
 src/tests/find-temp-allocs.c        |  1 +
 src/tests/meson.build               | 13 +++++++++----
 src/tests/show-page-usage.c         |  1 +
 src/tests/test-addr-decode.c        |  1 +
 src/tests/test-addr-map.c           |  1 +
 src/tests/test-capture-cursor.c     |  1 +
 src/tests/test-capture.c            |  1 +
 src/tests/test-mapped-ring-buffer.c |  1 +
 src/tests/test-resolvers.c          |  1 +
 10 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/src/tests/cross-thread-frees.c b/src/tests/cross-thread-frees.c
index cd973b7..f4ec892 100644
--- a/src/tests/cross-thread-frees.c
+++ b/src/tests/cross-thread-frees.c
@@ -20,6 +20,7 @@
 
 #include "config.h"
 
+#include <glib.h>
 #include <stddef.h>
 #include <rax.h>
 #include <sysprof.h>
diff --git a/src/tests/find-temp-allocs.c b/src/tests/find-temp-allocs.c
index 4a8e300..3df3c2c 100644
--- a/src/tests/find-temp-allocs.c
+++ b/src/tests/find-temp-allocs.c
@@ -20,6 +20,7 @@
 
 #include "config.h"
 
+#include <glib.h>
 #include <sysprof-capture.h>
 
 static struct {
diff --git a/src/tests/meson.build b/src/tests/meson.build
index f2825f6..1a450ae 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -12,24 +12,29 @@ test_cflags = [
   '-DSYSPROF_COMPILATION=1',
 ]
 
+test_capture_deps = [
+  dependency('glib-2.0'),
+  libsysprof_capture_dep,
+]
+
 test_capture = executable('test-capture', 'test-capture.c',
         c_args: test_cflags,
-  dependencies: [libsysprof_capture_dep],
+  dependencies: test_capture_deps,
 )
 
 test_capture_cursor = executable('test-capture-cursor', 'test-capture-cursor.c',
         c_args: test_cflags,
-  dependencies: [libsysprof_capture_dep],
+  dependencies: test_capture_deps,
 )
 
 test_mapped_ring_buffer = executable('test-mapped-ring-buffer', 'test-mapped-ring-buffer.c',
         c_args: test_cflags,
-  dependencies: [libsysprof_capture_dep],
+  dependencies: test_capture_deps,
 )
 
 find_temp_allocs = executable('find-temp-allocs', 'find-temp-allocs.c',
         c_args: test_cflags,
-  dependencies: [libsysprof_capture_dep],
+  dependencies: test_capture_deps,
 )
 
 test('test-capture', test_capture, env: test_env)
diff --git a/src/tests/show-page-usage.c b/src/tests/show-page-usage.c
index 536f7bc..0a6a1c2 100644
--- a/src/tests/show-page-usage.c
+++ b/src/tests/show-page-usage.c
@@ -21,6 +21,7 @@
 #include "config.h"
 
 #include <cairo.h>
+#include <glib.h>
 #include <stddef.h>
 #include <rax.h>
 #include <sysprof.h>
diff --git a/src/tests/test-addr-decode.c b/src/tests/test-addr-decode.c
index 66ca209..8757bed 100644
--- a/src/tests/test-addr-decode.c
+++ b/src/tests/test-addr-decode.c
@@ -1,4 +1,5 @@
 #include <fcntl.h>
+#include <glib.h>
 #include <sysprof.h>
 
 #include "sysprof-platform.h"
diff --git a/src/tests/test-addr-map.c b/src/tests/test-addr-map.c
index 47a2d82..022e814 100644
--- a/src/tests/test-addr-map.c
+++ b/src/tests/test-addr-map.c
@@ -1,4 +1,5 @@
 #include <fcntl.h>
+#include <glib.h>
 #include <sysprof.h>
 
 #include "sysprof-platform.h"
diff --git a/src/tests/test-capture-cursor.c b/src/tests/test-capture-cursor.c
index 0781fc0..dc24cba 100644
--- a/src/tests/test-capture-cursor.c
+++ b/src/tests/test-capture-cursor.c
@@ -18,6 +18,7 @@
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include <glib.h>
 #include <glib/gstdio.h>
 #include <sysprof-capture.h>
 
diff --git a/src/tests/test-capture.c b/src/tests/test-capture.c
index 64d6f2c..895fdfc 100644
--- a/src/tests/test-capture.c
+++ b/src/tests/test-capture.c
@@ -21,6 +21,7 @@
 #include "config.h"
 
 #include <fcntl.h>
+#include <glib.h>
 #include <glib/gstdio.h>
 #include <string.h>
 #include <sysprof-capture.h>
diff --git a/src/tests/test-mapped-ring-buffer.c b/src/tests/test-mapped-ring-buffer.c
index 5c6c014..3213c7e 100644
--- a/src/tests/test-mapped-ring-buffer.c
+++ b/src/tests/test-mapped-ring-buffer.c
@@ -1,5 +1,6 @@
 #include "mapped-ring-buffer.h"
 
+#include <glib.h>
 #include <stdint.h>
 
 static gsize real_count;
diff --git a/src/tests/test-resolvers.c b/src/tests/test-resolvers.c
index 9021c6d..8ba0e34 100644
--- a/src/tests/test-resolvers.c
+++ b/src/tests/test-resolvers.c
@@ -1,3 +1,4 @@
+#include <glib.h>
 #include <sysprof.h>
 
 static const SysprofCaptureSample *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]