Skip to content

Commit

Permalink
Tests: Add log-file option to WPT runner script
Browse files Browse the repository at this point in the history
Always dropping the log file in /tmp isn't the greatest DX for debugging
failures
  • Loading branch information
ADKaster authored and awesomekling committed Jun 2, 2024
1 parent db65077 commit 2a4b61c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Tests/LibWeb/WPT/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ fi
which WebDriver)}"
update_expectations_metadata=false
remove_wpt_repository=false
# Generate name for file with wpt run log
wpt_run_log_filename="$(mktemp)"

for arg in "$@"; do
case $arg in
Expand All @@ -30,6 +32,10 @@ for arg in "$@"; do
remove_wpt_repository=true
shift
;;
--log-file=*)
wpt_run_log_filename="$(realpath "${arg#*=}")"
shift
;;
*)
echo "Unknown argument ${arg}"
exit 1
Expand Down Expand Up @@ -66,9 +72,6 @@ fi
# Extract metadata.txt into directory with expectation files expected by WPT runner
python3 ./concat-extract-metadata.py --extract metadata.txt metadata

# Generate name for file with wpt run log
wpt_run_log_filename="$(mktemp).txt"

# Run tests.
python3 ./wpt/wpt run ladybird \
--webdriver-binary "${WEBDRIVER_BINARY}" \
Expand Down

0 comments on commit 2a4b61c

Please sign in to comment.