Tests: use eina_environment_tmp_get()

This commit is contained in:
Vincent Torri 2015-10-15 07:47:04 +02:00 committed by Tom Hacohen
parent 7b401f34da
commit 11846b406b
2 changed files with 2 additions and 24 deletions

View File

@ -143,18 +143,7 @@ START_TEST(ecore_test_ecore_file_operations)
Eina_Bool res;
Eina_List *list;
#ifndef HAVE_EVIL
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
{
tmpdir = getenv("TMPDIR");
if (!tmpdir) tmpdir = getenv("XDG_RUNTIME_DIR");
}
if (!tmpdir) tmpdir = "/tmp";
#else
tmpdir = (char *)evil_tmpdir_get();
#endif /* ! HAVE_EVIL */
tmpdir = eina_environment_tmp_get();
ret = ecore_file_init();
fail_if(ret != 1);

View File

@ -122,18 +122,7 @@ START_TEST(eio_model_test_test_monitor_add)
fail_if(!ecore_init(), "ERROR: Cannot init Ecore!\n");
fail_if(!eio_init(), "ERROR: Cannot init EIO!\n");
#ifndef HAVE_EVIL
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
{
tmpdir = getenv("TMPDIR");
if (!tmpdir) tmpdir = getenv("XDG_RUNTIME_DIR");
}
if (!tmpdir) tmpdir = "/tmp";
#else
tmpdir = (char *)evil_tmpdir_get();
#endif /* ! HAVE_EVIL */
tmpdir = eina_environment_tmp_get();
filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(tmpdir));
fail_if(!filemodel, "ERROR: Cannot init model!\n");