diff options
author | Stefan Schmidt <s.schmidt@samsung.com> | 2015-02-12 09:52:21 +0100 |
---|---|---|
committer | Stefan Schmidt <s.schmidt@samsung.com> | 2015-02-12 10:47:02 +0100 |
commit | 46829c05fe2edda7bb3951e8f4ef65bb241f0881 (patch) | |
tree | b89cfbf9d99a27c03940d55a05637d23434c8543 /src | |
parent | 8c7c48a3f745194d21f01b857c3640d6a9bb88d3 (diff) |
Revert "ecore: fix path comparison in Ecore_File test suite."
This reverts commit 66c0f3261dab904fce533b0f7d30b1b374abd658.
This commit breaks the eina_file suite on Gentoo (our jenkins OS).
ref T2105
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/ecore/ecore_test_ecore_file.c | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_file.c b/src/tests/ecore/ecore_test_ecore_file.c index 8b3c567c76..515ff54b59 100644 --- a/src/tests/ecore/ecore_test_ecore_file.c +++ b/src/tests/ecore/ecore_test_ecore_file.c | |||
@@ -55,29 +55,6 @@ get_tmp_file() | |||
55 | return tmp_file; | 55 | return tmp_file; |
56 | } | 56 | } |
57 | 57 | ||
58 | int | ||
59 | _compare_path(const char *filePathA, const char *filePathB) | ||
60 | { | ||
61 | char realFilePathA[MAXSIZE]; | ||
62 | char realFilePathB[MAXSIZE]; | ||
63 | #ifdef _WIN32 | ||
64 | GetFullPathName(filePathA, MAXSIZE, realFilePathA, NULL); | ||
65 | GetFullPathName(filePathB, MAXSIZE, realFilePathB, NULL); | ||
66 | #else | ||
67 | realpath(filePathA, realFilePathA); | ||
68 | realpath(filePathB, realFilePathB); | ||
69 | #endif | ||
70 | return strcmp(realFilePathA, realFilePathB); | ||
71 | } | ||
72 | |||
73 | #define assert_path_eq(X, Y) \ | ||
74 | do { \ | ||
75 | const char* _ck_x = (X); \ | ||
76 | const char* _ck_y = (Y); \ | ||
77 | ck_assert_msg(0 == _compare_path(_ck_y, _ck_x), \ | ||
78 | "Assertion '%s' failed: %s==\"%s\", %s==\"%s\"", #X"=="#Y, #X, _ck_x, #Y, _ck_y); \ | ||
79 | } while (0) | ||
80 | |||
81 | static void | 58 | static void |
82 | file_monitor_cb(void *data EINA_UNUSED, Ecore_File_Monitor *em EINA_UNUSED, | 59 | file_monitor_cb(void *data EINA_UNUSED, Ecore_File_Monitor *em EINA_UNUSED, |
83 | Ecore_File_Event event, const char *path) | 60 | Ecore_File_Event event, const char *path) |
@@ -227,8 +204,8 @@ START_TEST(ecore_test_ecore_file_operations) | |||
227 | 204 | ||
228 | res = ecore_file_symlink(src_file, dest_file); | 205 | res = ecore_file_symlink(src_file, dest_file); |
229 | fail_if(res != EINA_TRUE); | 206 | fail_if(res != EINA_TRUE); |
230 | assert_path_eq(ecore_file_readlink(dest_file), src_file); | 207 | ck_assert_str_eq(ecore_file_readlink(dest_file), src_file); |
231 | assert_path_eq(ecore_file_realpath(dest_file), src_file); | 208 | ck_assert_str_eq(ecore_file_realpath(dest_file), src_file); |
232 | res = ecore_file_unlink(dest_file); | 209 | res = ecore_file_unlink(dest_file); |
233 | fail_if(res != EINA_TRUE); | 210 | fail_if(res != EINA_TRUE); |
234 | 211 | ||
@@ -241,8 +218,8 @@ START_TEST(ecore_test_ecore_file_operations) | |||
241 | res = ecore_file_exists(src_file); | 218 | res = ecore_file_exists(src_file); |
242 | fail_if(res != EINA_FALSE); | 219 | fail_if(res != EINA_FALSE); |
243 | 220 | ||
244 | assert_path_eq(ecore_file_dir_get(dest_file), tmpdir); | 221 | ck_assert_str_eq(ecore_file_dir_get(dest_file), tmpdir); |
245 | assert_path_eq(ecore_file_realpath(dest_file), dest_file); | 222 | ck_assert_str_eq(ecore_file_realpath(dest_file), dest_file); |
246 | fail_if(ecore_file_mod_time(dest_file) == 0); | 223 | fail_if(ecore_file_mod_time(dest_file) == 0); |
247 | fail_if(ecore_file_can_read(dest_file) != EINA_TRUE); | 224 | fail_if(ecore_file_can_read(dest_file) != EINA_TRUE); |
248 | fail_if(ecore_file_can_write(dest_file) != EINA_TRUE); | 225 | fail_if(ecore_file_can_write(dest_file) != EINA_TRUE); |
@@ -286,7 +263,7 @@ START_TEST(ecore_test_ecore_file_monitor) | |||
286 | _writeToFile(file_name, random_text); | 263 | _writeToFile(file_name, random_text); |
287 | _writeToFile(file_name, random_text); | 264 | _writeToFile(file_name, random_text); |
288 | 265 | ||
289 | assert_path_eq(ecore_file_monitor_path_get(mon), realp); | 266 | ck_assert_str_eq(ecore_file_monitor_path_get(mon), realp); |
290 | 267 | ||
291 | ret = ecore_file_mksubdirs(src_dir, sub_dir); | 268 | ret = ecore_file_mksubdirs(src_dir, sub_dir); |
292 | fail_if(ret != 1); | 269 | fail_if(ret != 1); |