Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some updates to testing infrastructure #5

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Source/cmake/OptionsHaiku.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,6 @@ if (CMAKE_COMPILER_IS_GNUCC AND "${LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR}" STREQ
set(CMAKE_CXX_FLAGS "-march=i686 ${CMAKE_CXX_FLAGS}")
endif()

if (CMAKE_COMPILER_IS_GNUCC AND "${LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
# GCC port issue? This is not needed for other platforms.
set(CMAKE_EXE_LINKER_FLAGS "-pie ${CMAKE_EXE_LINKER_FLAGS}")
endif()

SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER OFF)
SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_GL OFF)
SET_AND_EXPOSE_TO_BUILD(ENABLE_GRAPHICS_CONTEXT_GL OFF)
Expand Down
11 changes: 11 additions & 0 deletions Tools/DumpRenderTree/haiku/DumpRenderTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,17 @@ static String dumpFramesAsText(BWebFrame* frame)
}
}

// To keep things tidy, strip all trailing spaces: they are not a meaningful part of dumpAsText test output.
size_t spacePosition = String::MaxLength;
while ((spacePosition = result.reverseFind(" \n", spacePosition)) != notFound)
result.remove(spacePosition, 1);
if (!result.isEmpty()) {
spacePosition = result.length();
while (spacePosition > 0 && result[spacePosition - 1] == ' ')
spacePosition--;
result.remove(spacePosition, result.length() - spacePosition);
}

return result;
}

Expand Down
2 changes: 1 addition & 1 deletion Tools/Scripts/webkitpy/port/haiku.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _search_paths(self):
return search_paths

def default_baseline_search_path(self, **kwargs):
return map(self._webkit_baseline_path, self._search_paths())
return list(map(self._webkit_baseline_path, self._search_paths()))

def _port_specific_expectations_files(self, **kwargs):
return [self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in reversed(self._search_paths())]
Expand Down
2 changes: 1 addition & 1 deletion Tools/Scripts/webkitpy/port/haiku_get_crash_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, name, pid, newer_than, filesystem, path_to_driver):
def _get_debugger_output(self, coredump_path):
result = None
try:
with open(coredump_path) as corefile:
with open(coredump_path, 'rb') as corefile:
result = corefile.read().decode('utf8', 'ignore')
os.unlink(coredump_path)
except IOError:
Expand Down
6 changes: 3 additions & 3 deletions Tools/haiku/mimefix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# always make the best guess on the type of files, and the test suite relies on the types being
# correct. So, let's fix them!

set TESTS=BEOS:TYPE LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/*/*.html LayoutTests/css3/filters/regions-expanding.html LayoutTests/editing/caret/*.html
TESTS="LayoutTests/webgl/1.0.3/resources/webgl_test_files/conformance/*/*.html LayoutTests/css3/filters/regions-expanding.html LayoutTests/editing/caret/*.html"

rmattr -f BEOS:TYPE $TESTS
addattr BEOS:TYPE $TESTS
rmattr BEOS:TYPE $TESTS
addattr -t mime BEOS:TYPE text/html $TESTS