mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
LibWeb+Documentation: Remove the rebaseline-libweb-test script
This is superseded by the headless-browser --rebaseline flag.
This commit is contained in:
parent
f56b33f8d5
commit
d33a87c8c4
Notes:
github-actions[bot]
2024-10-03 13:16:43 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/d33a87c8c41 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1612 Reviewed-by: https://github.com/AtkinsSJ ✅
2 changed files with 1 additions and 40 deletions
|
@ -157,7 +157,7 @@ Running `Tests/LibWeb/add_libweb_test.py your-new-test-name` will create a new t
|
|||
a corresponding expectations file in `Tests/LibWeb/Text/expected/your-new-test-name.txt`.
|
||||
|
||||
After you update/replace the generated boilerplate in your `your-new-test-name.html` test file with your actual test,
|
||||
running `./Tests/LibWeb/rebaseline-libweb-test file:///opt/ladybird/Tests/LibWeb/Text/input/foobar.html` will
|
||||
running `headless-browser --run-tests "${LADYBIRD_SOURCE_DIR}/Tests/LibWeb" --rebaseline -f Text/input/foobar.html` will
|
||||
regenerate the corresponding expectations file — to match the actual output from your updated test (where
|
||||
`/opt/ladybird` should be replaced with the absolute path your ladybird clone in your local environment).
|
||||
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/bash
|
||||
set +e
|
||||
|
||||
t=$1
|
||||
if echo -n $t | grep ^file: ; then
|
||||
t=$(echo -n $t | sed s@^file://@@)
|
||||
fi
|
||||
|
||||
if echo -n $t | grep Layout ; then
|
||||
mode_flag="-d"
|
||||
else
|
||||
mode_flag="-T"
|
||||
fi
|
||||
|
||||
input_dir=$(dirname $t)
|
||||
expected_dir=$(echo $input_dir | sed s/input/expected/)
|
||||
test_name=$(basename $t .html)
|
||||
|
||||
if [[ "$BUILD_PRESET" == "Sanitizer" ]]; then
|
||||
build_dir=$LADYBIRD_SOURCE_DIR/Build/ladybird-sanitizers
|
||||
elif [[ "$BUILD_PRESET" == "Debug" ]]; then
|
||||
build_dir=$LADYBIRD_SOURCE_DIR/Build/ladybird-debug
|
||||
else
|
||||
build_dir=$LADYBIRD_SOURCE_DIR/Build/ladybird
|
||||
fi
|
||||
|
||||
cd "$build_dir" || { echo "Couldn’t cd to build directory" >&2 && exit 1; }
|
||||
|
||||
if [[ -f ./bin/headless-browser ]]; then
|
||||
ladybird_headless_binary=./bin/headless-browser
|
||||
elif [[ -f ./bin/Ladybird.app/Contents/MacOS/headless-browser ]]; then
|
||||
ladybird_headless_binary=./bin/Ladybird.app/Contents/MacOS/headless-browser
|
||||
else
|
||||
echo "ERR: Could not find headless-browser binary" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p $expected_dir
|
||||
$ladybird_headless_binary $mode_flag --force-fontconfig --layout-test-mode $input_dir/$test_name.html > $expected_dir/$test_name.txt
|
Loading…
Reference in a new issue