Commit c8a39261 authored by Matthias Clasen's avatar Matthias Clasen

Use g_test_get_dir in test to locate files

This makes the tests work both installed and for make check.
parent 3d225fb0
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment