forked from enlightenment/efl
Tests: use eina_environment_tmp_get()
This commit is contained in:
parent
7b401f34da
commit
11846b406b
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue