aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Torri <vincent dot torri at gmail dot com>2015-10-15 07:47:04 +0200
committerTom Hacohen <tom@stosb.com>2015-10-15 09:34:33 +0100
commit11846b406b5d037c315c2f22c9049e642c02de83 (patch)
tree18a2963ad788c1ae2b224d2e9ca0bd579ce99f88
parentEvas GL: Add more tests (diff)
downloadefl-11846b406b5d037c315c2f22c9049e642c02de83.tar.gz
Tests: use eina_environment_tmp_get()
-rw-r--r--src/tests/ecore/ecore_test_ecore_file.c13
-rw-r--r--src/tests/eio/eio_model_test_monitor_add.c13
2 files changed, 2 insertions, 24 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_file.c b/src/tests/ecore/ecore_test_ecore_file.c
index 88382643c4..93689ac4ec 100644
--- a/src/tests/ecore/ecore_test_ecore_file.c
+++ b/src/tests/ecore/ecore_test_ecore_file.c
@@ -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);
diff --git a/src/tests/eio/eio_model_test_monitor_add.c b/src/tests/eio/eio_model_test_monitor_add.c
index 87a4ee379b..8230ec2f26 100644
--- a/src/tests/eio/eio_model_test_monitor_add.c
+++ b/src/tests/eio/eio_model_test_monitor_add.c
@@ -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");