WebKit can be build with WEBKITOUTPUTDIR env variable set using build-webkit script. In this case WEBKITOUTPUDIR may be outside repository structure. This causes testmimehandling and testwebview to fail because they use external test files in WebKit Source directory. This bug fixes this issue introducing optional environment variable WEBKITREPODIR
Created attachment 97704 [details] testutils1.patch
Subscribing Arno and Gustavo involved in connected bug (this one improves it) - 34940 [Gtk] testwebview does not work when called with absolute path
Created attachment 98135 [details] Patch
Created attachment 98142 [details] Patch2 Updated code style
Comment on attachment 98142 [details] Patch2 View in context: https://bugs.webkit.org/attachment.cgi?id=98142&action=review > Source/WebKit/gtk/tests/test_utils.c:34 > + /* user can set location of the webkit repository directory if it differs from build directory */ > + const char* repo_path = g_getenv("WEBKITREPODIR"); > + if (repo_path) { > + if (g_chdir(repo_path)) { > + return -1; > + } > + } > + else if (g_path_is_absolute(executable_path)) { Indentation seems quite off here, or is it the patch viewer? The inner if should not have bracers (this file has plenty of this problem, unfortunately), and the else if should be in the same line as the }. Also, given this is a C file, the * should be on the right side. What do you think of doing a style cleanup on this file? ;)
Comment on attachment 98142 [details] Patch2 View in context: https://bugs.webkit.org/attachment.cgi?id=98142&action=review >> Source/WebKit/gtk/tests/test_utils.c:34 >> + else if (g_path_is_absolute(executable_path)) { > > Indentation seems quite off here, or is it the patch viewer? The inner if should not have bracers (this file has plenty of this problem, unfortunately), and the else if should be in the same line as the }. Also, given this is a C file, the * should be on the right side. What do you think of doing a style cleanup on this file? ;) Indentation fixed. Coding style cleanup done. Unfortunately this file has exception in check-webkit-style so it is not taken into account when checking style
Created attachment 100705 [details] Fix GTK unit test failures + coding style enhancements
Comment on attachment 100705 [details] Fix GTK unit test failures View in context: https://bugs.webkit.org/attachment.cgi?id=100705&action=review > Source/WebKit/gtk/tests/test_utils.c:31 > + if (repoPath) { > + if (g_chdir(repoPath)) > + return -1; I believe this return is still misindented; there is a tab here. I'll land it manually and fix it before doing it.
Comment on attachment 100705 [details] Fix GTK unit test failures http://trac.webkit.org/changeset/90994
Gustavo, thank you for review and commit update.