Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | Instead of writing the temporary mapping files in the mappedfile test to the |
| 2 | user runtime directory, write them to $TMP. The runtime directory may not |
| 3 | currently exist if the test is executed on a non-desktop system and the test |
| 4 | doesn't attempt to create the directory structure. |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
| 8 | |
| 9 | diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c |
| 10 | index 40e0e60..27a24be 100644 |
| 11 | --- a/glib/tests/mappedfile.c |
| 12 | +++ b/glib/tests/mappedfile.c |
| 13 | @@ -81,7 +81,7 @@ test_writable (void) |
| 14 | const gchar *new = "abcdefghijklmnopqrstuvxyz"; |
| 15 | gchar *tmp_copy_path; |
| 16 | |
| 17 | - tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL); |
| 18 | + tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL); |
| 19 | |
| 20 | g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error); |
| 21 | g_assert_no_error (error); |
| 22 | @@ -125,7 +125,7 @@ test_writable_fd (void) |
| 23 | int fd; |
| 24 | gchar *tmp_copy_path; |
| 25 | |
| 26 | - tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL); |
| 27 | + tmp_copy_path = g_build_filename (g_get_tmp_dir (), "glib-test-4096-random-bytes", NULL); |
| 28 | |
| 29 | g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error); |
| 30 | g_assert_no_error (error); |