Meta: Ensure wptreport browser_version field is always populated

This was previously done by passing the `LADYBIRD_GIT_VERSION`
environment variable to `wpt`, but this doesn't work in chunked mode.
This commit is contained in:
Tim Ledbetter 2025-05-14 07:21:25 +01:00 committed by Jelle Raaijmakers
commit 7f4916b806
Notes: github-actions[bot] 2025-05-15 12:03:57 +00:00

View file

@ -470,21 +470,19 @@ run_wpt_chunked() {
fi
if [ "$procs" -le 1 ]; then
command=(./wpt run -f --processes="${WPT_PROCESSES}" "$@")
command=(./wpt run -f --browser-version="1.0-$(ladybird_git_hash)" --processes="${WPT_PROCESSES}" "$@")
echo "${command[@]}"
"${command[@]}"
return
fi
concurrency=$(( $(nproc) * 2 / procs ))
LADYBIRD_GIT_VERSION="$(ladybird_git_hash)"
echo "Preparing the venv setup..."
base_venv="${BUILD_DIR}/wpt-prep/_venv"
./wpt --venv "$base_venv" run "${WPT_ARGS[@]}" ladybird THIS_TEST_CANNOT_POSSIBLY_EXIST || true
echo "Launching $procs chunked instances (concurrency=$concurrency each)"
export LADYBIRD_GIT_VERSION
local logs=()
local run_start_time
run_start_time=$(date +"%Y%m%d%H%M%S")
@ -506,9 +504,10 @@ run_wpt_chunked() {
--total-chunks="$procs" \
--chunk-type=hash \
-f \
--browser-version="1.0-$(ladybird_git_hash)"
--processes="$concurrency" \
"$@")
echo "[INSTANCE $i / ns wptns$i] LADYBIRD_GIT_VERSION=$LADYBIRD_GIT_VERSION ${command[*]}"
echo "[INSTANCE $i / ns wptns$i] ${command[*]}"
instance_run "$i" "$rundir" script -q "$logpath" -c "$(printf "%q " "${command[@]}")" &>/dev/null &
done