mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
Meta: Add a command to WPT.sh to execute wpt serve
Just a handy command for local testing.
This commit is contained in:
committed by
Andreas Kling
parent
8598ed86fe
commit
bd8ab33593
14
Meta/WPT.sh
14
Meta/WPT.sh
@@ -148,6 +148,15 @@ run_wpt() {
|
|||||||
execute_wpt
|
execute_wpt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
serve_wpt()
|
||||||
|
{
|
||||||
|
ensure_wpt_repository
|
||||||
|
|
||||||
|
pushd "${WPT_SOURCE_DIR}" > /dev/null
|
||||||
|
./wpt serve
|
||||||
|
popd > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
compare_wpt() {
|
compare_wpt() {
|
||||||
ensure_wpt_repository
|
ensure_wpt_repository
|
||||||
METADATA_DIR=$(mktemp -d)
|
METADATA_DIR=$(mktemp -d)
|
||||||
@@ -160,7 +169,7 @@ compare_wpt() {
|
|||||||
rm -rf "${METADATA_DIR}"
|
rm -rf "${METADATA_DIR}"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "$CMD" =~ ^(update|run|compare)$ ]]; then
|
if [[ "$CMD" =~ ^(update|run|serve|compare)$ ]]; then
|
||||||
case "$CMD" in
|
case "$CMD" in
|
||||||
update)
|
update)
|
||||||
update_wpt
|
update_wpt
|
||||||
@@ -168,6 +177,9 @@ if [[ "$CMD" =~ ^(update|run|compare)$ ]]; then
|
|||||||
run)
|
run)
|
||||||
run_wpt
|
run_wpt
|
||||||
;;
|
;;
|
||||||
|
serve)
|
||||||
|
serve_wpt
|
||||||
|
;;
|
||||||
compare)
|
compare)
|
||||||
INPUT_LOG_NAME="$(pwd -P)/$1"
|
INPUT_LOG_NAME="$(pwd -P)/$1"
|
||||||
if [ ! -f "$INPUT_LOG_NAME" ]; then
|
if [ ! -f "$INPUT_LOG_NAME" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user