mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
Skip the writable test if the file is not writable
Since make distcheck operates on a readonly source tree.
This commit is contained in:
parent
67b8c7ea8a
commit
0e55346420
@ -1,5 +1,9 @@
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
static void
|
||||
test_empty (void)
|
||||
@ -38,6 +42,12 @@ test_writable (void)
|
||||
const gchar *old = "MMMMMMMMMMMMMMMMMMMMMMMMM";
|
||||
const gchar *new = "abcdefghijklmnopqrstuvxyz";
|
||||
|
||||
if (access (SRCDIR "/4096-random-bytes", W_OK) != 0)
|
||||
{
|
||||
g_test_message ("Skipping writable mapping test");
|
||||
return;
|
||||
}
|
||||
|
||||
error = NULL;
|
||||
file = g_mapped_file_new (SRCDIR "/4096-random-bytes", TRUE, &error);
|
||||
g_assert_no_error (error);
|
||||
|
Loading…
Reference in New Issue
Block a user