mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 11:56:16 +01:00
Merge branch 'wip/pwithnall/restore-macos-ci' into 'main'
Restore macOS CI See merge request GNOME/glib!2694
This commit is contained in:
commit
77c72f2a6d
@ -432,9 +432,6 @@ freebsd-13-x86_64:
|
||||
- "_build/meson-logs"
|
||||
|
||||
macos:
|
||||
# FIXME: Temporarily disabled as the worker is offline
|
||||
# See https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/558
|
||||
when: manual
|
||||
extends: .only-origin
|
||||
stage: build
|
||||
tags:
|
||||
|
@ -209,9 +209,9 @@ test_pollable_unix_pipe (void)
|
||||
static void
|
||||
test_pollable_unix_pty (void)
|
||||
{
|
||||
#ifdef HAVE_OPENPTY
|
||||
GPollableInputStream *in = NULL;
|
||||
GOutputStream *out = NULL;
|
||||
#ifdef HAVE_OPENPTY
|
||||
int a, b, status;
|
||||
#endif
|
||||
|
||||
|
@ -24,7 +24,7 @@ test_types (void)
|
||||
guint u, u2;
|
||||
gint s, s2;
|
||||
gpointer vp, vp2;
|
||||
const char *vp_str;
|
||||
const char *vp_str, *vp_str2;
|
||||
const char *volatile vp_str_vol;
|
||||
const char *str = "Hello";
|
||||
int *ip, *ip2;
|
||||
@ -140,10 +140,9 @@ test_types (void)
|
||||
gs2 = g_atomic_pointer_xor (&gs, 4);
|
||||
g_assert_cmpuint (gs2, ==, 12);
|
||||
g_assert_cmpuint (gs, ==, 8);
|
||||
vp2 = g_atomic_pointer_exchange ((gpointer*) &gs, NULL);
|
||||
gs2 = (gsize) vp2;
|
||||
g_assert_cmpuint (gs2, ==, 8);
|
||||
g_assert_null ((gpointer) gs);
|
||||
vp_str2 = g_atomic_pointer_exchange (&vp_str, str);
|
||||
g_assert_cmpstr (vp_str, ==, str);
|
||||
g_assert_null (vp_str2);
|
||||
|
||||
g_assert_cmpint (g_atomic_int_get (csp), ==, s);
|
||||
g_assert_true (g_atomic_pointer_get ((const gint **) cspp) == csp);
|
||||
@ -189,7 +188,7 @@ test_types (void)
|
||||
g_assert_cmpint (u, ==, 12);
|
||||
u2 = g_atomic_int_xor (&u, 4);
|
||||
g_assert_cmpint (u2, ==, 12);
|
||||
u2 = g_atomic_int_exchange (&u, 55);
|
||||
u2 = g_atomic_int_exchange ((gint*) &u, 55);
|
||||
g_assert_cmpint (u2, ==, 8);
|
||||
g_assert_cmpint (u, ==, 55);
|
||||
|
||||
@ -275,7 +274,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
gs2 = g_atomic_pointer_xor (&gs, 4);
|
||||
g_assert_cmpuint (gs2, ==, 12);
|
||||
g_assert_cmpuint (gs, ==, 8);
|
||||
vp2 = g_atomic_pointer_exchange ((gpointer*) &gs, NULL);
|
||||
vp2 = g_atomic_pointer_exchange (&gs, NULL);
|
||||
gs2 = (gsize) vp2;
|
||||
g_assert_cmpuint (gs2, ==, 8);
|
||||
g_assert_null ((gpointer) gs);
|
||||
|
@ -20,6 +20,9 @@ test_autofree (void)
|
||||
p = g_malloc (10);
|
||||
p2 = g_malloc (42);
|
||||
|
||||
p[0] = 1;
|
||||
p2[0] = 1;
|
||||
|
||||
if (TRUE)
|
||||
{
|
||||
g_autofree guint8 *buf = g_malloc (128);
|
||||
|
@ -63,25 +63,6 @@ corruption (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline gpointer
|
||||
memchunk_alloc (GMemChunk **memchunkp,
|
||||
guint size)
|
||||
{
|
||||
size = MAX (size, 1);
|
||||
if (G_UNLIKELY (!*memchunkp))
|
||||
*memchunkp = old_mem_chunk_new ("", size, 4096, G_ALLOC_AND_FREE);
|
||||
return old_mem_chunk_alloc (*memchunkp);
|
||||
}
|
||||
|
||||
static inline void
|
||||
memchunk_free (GMemChunk *memchunk,
|
||||
gpointer chunk)
|
||||
{
|
||||
old_mem_chunk_free (memchunk, chunk);
|
||||
if (clean_memchunks)
|
||||
old_mem_chunk_clean (memchunk);
|
||||
}
|
||||
|
||||
static gpointer
|
||||
test_sliced_mem_thread (gpointer data)
|
||||
{
|
||||
|
@ -26,7 +26,6 @@
|
||||
(rand_accu = 1664525 * rand_accu + 1013904223, rand_accu)
|
||||
|
||||
static guint prime_size = 1021; /* 769; 509 */
|
||||
static gboolean clean_memchunks = FALSE;
|
||||
static guint number_of_blocks = 10000; /* total number of blocks allocated */
|
||||
static guint number_of_repetitions = 10000; /* number of alloc+free repetitions */
|
||||
static gboolean want_corruption = FALSE;
|
||||
@ -63,25 +62,6 @@ corruption (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline gpointer
|
||||
memchunk_alloc (GMemChunk **memchunkp,
|
||||
guint size)
|
||||
{
|
||||
size = MAX (size, 1);
|
||||
if (G_UNLIKELY (!*memchunkp))
|
||||
*memchunkp = old_mem_chunk_new ("", size, 4096, G_ALLOC_AND_FREE);
|
||||
return old_mem_chunk_alloc (*memchunkp);
|
||||
}
|
||||
|
||||
static inline void
|
||||
memchunk_free (GMemChunk *memchunk,
|
||||
gpointer chunk)
|
||||
{
|
||||
old_mem_chunk_free (memchunk, chunk);
|
||||
if (clean_memchunks)
|
||||
old_mem_chunk_clean (memchunk);
|
||||
}
|
||||
|
||||
static gpointer
|
||||
test_sliced_mem_thread (gpointer data)
|
||||
{
|
||||
|
@ -26,7 +26,6 @@
|
||||
(rand_accu = 1664525 * rand_accu + 1013904223, rand_accu)
|
||||
|
||||
static guint prime_size = 1021; /* 769; 509 */
|
||||
static gboolean clean_memchunks = FALSE;
|
||||
static guint number_of_blocks = 10000; /* total number of blocks allocated */
|
||||
static guint number_of_repetitions = 10000; /* number of alloc+free repetitions */
|
||||
static gboolean want_corruption = FALSE;
|
||||
@ -63,25 +62,6 @@ corruption (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline gpointer
|
||||
memchunk_alloc (GMemChunk **memchunkp,
|
||||
guint size)
|
||||
{
|
||||
size = MAX (size, 1);
|
||||
if (G_UNLIKELY (!*memchunkp))
|
||||
*memchunkp = old_mem_chunk_new ("", size, 4096, G_ALLOC_AND_FREE);
|
||||
return old_mem_chunk_alloc (*memchunkp);
|
||||
}
|
||||
|
||||
static inline void
|
||||
memchunk_free (GMemChunk *memchunk,
|
||||
gpointer chunk)
|
||||
{
|
||||
old_mem_chunk_free (memchunk, chunk);
|
||||
if (clean_memchunks)
|
||||
old_mem_chunk_clean (memchunk);
|
||||
}
|
||||
|
||||
static gpointer
|
||||
test_sliced_mem_thread (gpointer data)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ static const guint prime_size = 1021; /* 769; 509 */
|
||||
static const gboolean clean_memchunks = FALSE;
|
||||
static const guint number_of_blocks = 10000; /* total number of blocks allocated */
|
||||
static const guint number_of_repetitions = 10000; /* number of alloc+free repetitions */
|
||||
static const gboolean want_corruption = FALSE;
|
||||
|
||||
/* --- old memchunk prototypes (memchunks.c) --- */
|
||||
GMemChunk* old_mem_chunk_new (const gchar *name,
|
||||
@ -51,18 +50,6 @@ void old_mem_chunk_info (void);
|
||||
#endif
|
||||
|
||||
/* --- functions --- */
|
||||
static inline int
|
||||
corruption (void)
|
||||
{
|
||||
if (G_UNLIKELY (want_corruption))
|
||||
{
|
||||
/* corruption per call likelyness is about 1:4000000 */
|
||||
guint32 r = g_random_int() % 8000009;
|
||||
return r == 277 ? +1 : r == 281 ? -1 : 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline gpointer
|
||||
memchunk_alloc (GMemChunk **memchunkp,
|
||||
guint size)
|
||||
|
@ -26,7 +26,6 @@
|
||||
(rand_accu = 1664525 * rand_accu + 1013904223, rand_accu)
|
||||
|
||||
static guint prime_size = 1021; /* 769; 509 */
|
||||
static gboolean clean_memchunks = FALSE;
|
||||
static guint number_of_blocks = 10000; /* total number of blocks allocated */
|
||||
static guint number_of_repetitions = 10000; /* number of alloc+free repetitions */
|
||||
static gboolean want_corruption = FALSE;
|
||||
@ -63,25 +62,6 @@ corruption (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline gpointer
|
||||
memchunk_alloc (GMemChunk **memchunkp,
|
||||
guint size)
|
||||
{
|
||||
size = MAX (size, 1);
|
||||
if (G_UNLIKELY (!*memchunkp))
|
||||
*memchunkp = old_mem_chunk_new ("", size, 4096, G_ALLOC_AND_FREE);
|
||||
return old_mem_chunk_alloc (*memchunkp);
|
||||
}
|
||||
|
||||
static inline void
|
||||
memchunk_free (GMemChunk *memchunk,
|
||||
gpointer chunk)
|
||||
{
|
||||
old_mem_chunk_free (memchunk, chunk);
|
||||
if (clean_memchunks)
|
||||
old_mem_chunk_clean (memchunk);
|
||||
}
|
||||
|
||||
static gpointer
|
||||
test_sliced_mem_thread (gpointer data)
|
||||
{
|
||||
|
@ -792,7 +792,7 @@ glib_have_os_x_9_or_later = false
|
||||
glib_have_carbon = false
|
||||
glib_have_cocoa = false
|
||||
if host_system == 'darwin'
|
||||
add_languages('objc')
|
||||
add_languages('objc', native: false, required: true)
|
||||
objcc = meson.get_compiler('objc')
|
||||
|
||||
add_project_arguments(objcc.get_supported_arguments(warning_objc_args), language: 'objc')
|
||||
|
Loading…
Reference in New Issue
Block a user