mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
Meta: Make WPT.sh log args relative to cwd as of script invocation
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This restores the behaviour from before adding parallel instance support.
This commit is contained in:
parent
19bf897116
commit
43defa90cc
Notes:
github-actions[bot]
2025-05-08 22:51:02 +00:00
Author: https://github.com/alimpfard
Commit: 43defa90cc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4655
Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 18 additions and 3 deletions
21
Meta/WPT.sh
21
Meta/WPT.sh
|
@ -85,6 +85,7 @@ WPT_ARGS=( "--webdriver-binary=${WEBDRIVER_BINARY}"
|
||||||
"--no-pause-after-test"
|
"--no-pause-after-test"
|
||||||
"${EXTRA_WPT_ARGS[@]}"
|
"${EXTRA_WPT_ARGS[@]}"
|
||||||
)
|
)
|
||||||
|
WPT_LOG_ARGS=()
|
||||||
|
|
||||||
ARG0=$0
|
ARG0=$0
|
||||||
print_help() {
|
print_help() {
|
||||||
|
@ -172,7 +173,7 @@ set_logging_flags()
|
||||||
log_type="${1}"
|
log_type="${1}"
|
||||||
log_name="${2}"
|
log_name="${2}"
|
||||||
|
|
||||||
WPT_ARGS+=( "${log_type}=${log_name}" )
|
WPT_LOG_ARGS+=("${log_type}" "${log_name}")
|
||||||
}
|
}
|
||||||
|
|
||||||
headless=1
|
headless=1
|
||||||
|
@ -458,9 +459,10 @@ show_summary() {
|
||||||
echo "Longest run time: ${max_time}s"
|
echo "Longest run time: ${max_time}s"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# run_wpt_chunked <#processes> <wpt args...>
|
||||||
run_wpt_chunked() {
|
run_wpt_chunked() {
|
||||||
local procs concurrency
|
local procs concurrency
|
||||||
procs=$(make_instances)
|
procs="$1"; shift
|
||||||
|
|
||||||
# Ensure open files limit is at least 1024, so the WPT runner does not run out of descriptors
|
# Ensure open files limit is at least 1024, so the WPT runner does not run out of descriptors
|
||||||
if [ "$(ulimit -n)" -lt $((1024 * procs)) ]; then
|
if [ "$(ulimit -n)" -lt $((1024 * procs)) ]; then
|
||||||
|
@ -515,7 +517,20 @@ run_wpt_chunked() {
|
||||||
show_summary "${logs[@]}"
|
show_summary "${logs[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
absolutize_log_args() {
|
||||||
|
for ((i=0; i<${#WPT_LOG_ARGS[@]}; i += 2)); do
|
||||||
|
WPT_LOG_ARGS[i + 1]="$(absolutize_path "${WPT_LOG_ARGS[i + 1]}")"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
execute_wpt() {
|
execute_wpt() {
|
||||||
|
local procs
|
||||||
|
|
||||||
|
procs=$(make_instances)
|
||||||
|
if [[ "$procs" -le 1 ]]; then
|
||||||
|
absolutize_log_args
|
||||||
|
fi
|
||||||
|
|
||||||
pushd "${WPT_SOURCE_DIR}" > /dev/null
|
pushd "${WPT_SOURCE_DIR}" > /dev/null
|
||||||
for certificate_path in "${WPT_CERTIFICATES[@]}"; do
|
for certificate_path in "${WPT_CERTIFICATES[@]}"; do
|
||||||
if [ ! -f "${certificate_path}" ]; then
|
if [ ! -f "${certificate_path}" ]; then
|
||||||
|
@ -525,7 +540,7 @@ execute_wpt() {
|
||||||
WPT_ARGS+=( "--webdriver-arg=--certificate=${certificate_path}" )
|
WPT_ARGS+=( "--webdriver-arg=--certificate=${certificate_path}" )
|
||||||
done
|
done
|
||||||
construct_test_list "${@}"
|
construct_test_list "${@}"
|
||||||
run_wpt_chunked "${WPT_ARGS[@]}" ladybird "${TEST_LIST[@]}"
|
run_wpt_chunked "$procs" "${WPT_ARGS[@]}" "${WPT_LOG_ARGS[@]}" ladybird "${TEST_LIST[@]}"
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue