Просмотр исходного кода

LibWeb+Documentation: Remove the rebaseline-libweb-test script

This is superseded by the headless-browser --rebaseline flag.
Timothy Flynn 10 месяцев назад
Родитель
Сommit
d33a87c8c4
2 измененных файлов с 1 добавлено и 40 удалено
  1. 1 1
      Documentation/Browser/Patterns.md
  2. 0 39
      Tests/LibWeb/rebaseline-libweb-test

+ 1 - 1
Documentation/Browser/Patterns.md

@@ -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).
 

+ 0 - 39
Tests/LibWeb/rebaseline-libweb-test

@@ -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