Skip to content

Commit

Permalink
Meta: Don't halt if importing a test fails in WPT.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tcl3 committed Dec 10, 2024
1 parent 4a9403c commit fdf323d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Meta/WPT.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,19 +222,28 @@ import_wpt()
done

TESTS=()
mapfile -t TESTS < <( "${ARG0}" list-tests "${INPUT_PATHS[@]}" )
while IFS= read -r test_file; do
TESTS+=("$test_file")
done < <(
"${ARG0}" list-tests "${INPUT_PATHS[@]}"
)
if [ "${#TESTS[@]}" -eq 0 ]; then
echo "No tests found for the given paths"
exit 1
fi

pushd "${LADYBIRD_SOURCE_DIR}" > /dev/null
./Meta/ladybird.sh build headless-browser
set +e
for path in "${TESTS[@]}"; do
echo "Importing test from ${path}"
./Meta/import-wpt-test.py https://wpt.live/"${path}"
if [ ! "$(./Meta/import-wpt-test.py https://wpt.live/"${path}")" ]; then
continue
fi
"${HEADLESS_BROWSER_BINARY}" --run-tests ./Tests/LibWeb --rebaseline -f "$path"
done
set -e
popd > /dev/null
}

Expand Down

0 comments on commit fdf323d

Please sign in to comment.