mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
Use g_test_get_dir in test to locate files
This makes the tests work both installed and for make check.
This commit is contained in:
parent
3d225fb059
commit
c8a392612b
@ -861,13 +861,9 @@ main (int argc, char **argv)
|
||||
|
||||
if (arg_base_dir)
|
||||
basedir = arg_base_dir;
|
||||
else if (g_getenv ("srcdir"))
|
||||
basedir = g_getenv ("srcdir");
|
||||
else
|
||||
basedir = ".";
|
||||
|
||||
basedir = g_test_get_dir (G_TEST_DIST);
|
||||
dir = g_file_new_for_path (basedir);
|
||||
|
||||
add_tests_for_files_in_directory (dir);
|
||||
|
||||
g_object_unref (dir);
|
||||
|
@ -393,13 +393,8 @@ main (int argc, char **argv)
|
||||
const char *basedir;
|
||||
GFile *dir;
|
||||
|
||||
if (g_getenv ("srcdir"))
|
||||
basedir = g_getenv ("srcdir");
|
||||
else
|
||||
basedir = ".";
|
||||
|
||||
basedir = g_test_get_dir (G_TEST_DIST);
|
||||
dir = g_file_new_for_path (basedir);
|
||||
|
||||
add_tests_for_files_in_directory (dir);
|
||||
|
||||
g_object_unref (dir);
|
||||
|
@ -584,10 +584,8 @@ main (int argc, char **argv)
|
||||
|
||||
if (arg_base_dir)
|
||||
basedir = arg_base_dir;
|
||||
else if (g_getenv ("srcdir"))
|
||||
basedir = g_getenv ("srcdir");
|
||||
else
|
||||
basedir = ".";
|
||||
basedir = g_test_get_dir (G_TEST_DIST);
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user