aboutsummaryrefslogtreecommitdiff
path: root/test/html/driver.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/html/driver.sh')
-rwxr-xr-xtest/html/driver.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/html/driver.sh b/test/html/driver.sh
index e4fbc739..de753196 100755
--- a/test/html/driver.sh
+++ b/test/html/driver.sh
@@ -2,7 +2,7 @@
#
# File: driver.sh
#
-# Copyright (C) 2023-2024 Rodrigo Arias Mallo <rodarima@gmail.com>
+# Copyright (C) 2023-2025 Rodrigo Arias Mallo <rodarima@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,6 +13,10 @@ set -e
set -x
DILLOBIN=${DILLOBIN:-$TOP_BUILDDIR/src/dillo}
+LEAKFILTER=${LEAKFILTER:-$TOP_SRCDIR/test/html/leakfilter.awk}
+
+# Clean asan options if set
+unset ASAN_OPTIONS
if [ ! -e $DILLOBIN ]; then
echo missing dillo binary, set DILLOBIN with the path to dillo
@@ -28,7 +32,7 @@ function render_page() {
htmlfile="$1"
outpic="$2"
- "$DILLOBIN" -f "$htmlfile" &
+ "$DILLOBIN" -f "$htmlfile" 2> dillo.err &
dillopid=$!
# TODO: We need a better system to determine when the page loaded
@@ -53,7 +57,12 @@ function render_page() {
fi
xwd -id "$winid" -silent | ${magick_bin} xwd:- png:${outpic}
- kill "$dillopid"
+ # Exit cleanly
+ kill -USR2 "$dillopid"
+
+ # Dillo may fail due to leaks, but we will check them manually
+ wait "$dillopid" || true
+ awk -f "$LEAKFILTER" < dillo.err
}
function test_file() {