[glib/wip/pwithnall/backport-2978-osx-test-fixes-glib-2-74: 1/2] tests: Don't run du on osx
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/pwithnall/backport-2978-osx-test-fixes-glib-2-74: 1/2] tests: Don't run du on osx
- Date: Thu, 20 Oct 2022 12:54:01 +0000 (UTC)
commit 6c7a242e379016e16ed495990a4c5feaf42bb75c
Author: Ray Strode <rstrode redhat com>
Date: Tue Oct 18 14:13:58 2022 -0400
tests: Don't run du on osx
The du command that ships on OS X doesn't understand
--bytes, so don't try to use du on that platform.
gio/tests/file.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gio/tests/file.c b/gio/tests/file.c
index 36dccac663..ccac590a41 100644
--- a/gio/tests/file.c
+++ b/gio/tests/file.c
@@ -2472,10 +2472,14 @@ get_size_from_du (const gchar *path, guint64 *size)
GError *error = NULL;
gchar *du_path = NULL;
- /* If we can’t find du, don’t try and run the test. */
+#ifndef HAVE_COCOA
du_path = g_find_program_in_path ("du");
+#endif
+
+ /* If we can’t find du, don’t try and run the test. */
if (du_path == NULL)
return FALSE;
+
g_free (du_path);
du = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]