Tests: Use layout tests placed in subdirectories

Allows organizing layout tests into subdirectories.
This commit is contained in:
martinfalisse 2023-04-01 19:11:19 +02:00 committed by Andreas Kling
parent 593a4a4232
commit 7028f75779
Notes: sideshowbarker 2024-07-17 16:23:55 +09:00

View File

@ -12,8 +12,9 @@ fi
BROWSER_BINARY="./headless-browser"
for input_html_path in "${SCRIPT_DIR}"/input/*.html; do
input_html_file="$(basename "${input_html_path}" .html)"
find "${SCRIPT_DIR}/input/" -type f -name "*.html" -print0 | while IFS= read -r -d '' input_html_path; do
input_html_file=${input_html_path/${SCRIPT_DIR}"/input/"/}
input_html_file=${input_html_file/".html"/}
output_layout_dump=$(cd "${LADYBIRD_BUILD_DIR}"; "${BROWSER_BINARY}" -d "${input_html_path}")
expected_layout_dump_path="${SCRIPT_DIR}/expected/${input_html_file}.txt"