diff options
author | Richard Hughes <richard@hughsie.com> | 2010-11-01 12:48:31 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2010-11-01 12:48:31 +0000 |
commit | 98d6dbc8b0c09aed39789315b90525f5fbd05976 (patch) | |
tree | 52bffa3d19a4c530f122e2d00ba90bb1a4044dd3 /src/up-self-test.c | |
parent | e1e796e584fe01456beb10fb441f0e05d668072a (diff) | |
download | upower-98d6dbc8b0c09aed39789315b90525f5fbd05976.tar.gz |
Ensure the self check code can find UPower.conf
Diffstat (limited to 'src/up-self-test.c')
-rw-r--r-- | src/up-self-test.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/up-self-test.c b/src/up-self-test.c index 70b6a1d..373cc6a 100644 --- a/src/up-self-test.c +++ b/src/up-self-test.c @@ -60,6 +60,12 @@ up_test_daemon_func (void) { UpDaemon *daemon; + /* make check, vs. make distcheck */ + if (g_file_test ("../etc/UPower.conf", G_FILE_TEST_EXISTS)) + g_setenv ("UPOWER_CONF_FILE_NAME", "../etc/UPower.conf", TRUE); + else + g_setenv ("UPOWER_CONF_FILE_NAME", "../../etc/UPower.conf", TRUE); + daemon = up_daemon_new (); g_assert (daemon != NULL); |