test: fix regression checks

This commit is contained in:
Tomás Romero committed 2026-10-16 17:37:26 +02:00
1 parent 378b5eec15
commit 48977e9411
3 files changed
+35 -4

No files matched your search

+6 -3
View File
@@ -32,11 +32,14 @@ class SmapsParsingTests(unittest.TestCase):
while True:
executable = benchmark.runtime_executable(process.pid)
if executable == Path(sleep).resolve():
break
# /proc/pid/exe changes at exec before the dynamic
# loader necessarily faults in the executable's pages.
report = benchmark.read_proc_mappings(process.pid, executable)
if report["by_kind"].get("executable", {}).get("rss_kib", 0) > 0:
break
if time.monotonic() >= deadline:
self.fail("launcher did not exec the target ELF")
self.fail("target ELF did not become resident after exec")
time.sleep(0.01)
report = benchmark.read_proc_mappings(process.pid, executable)
self.assertGreater(report["by_kind"]["executable"]["rss_kib"], 0)
self.assertNotIn(directory, json.dumps(report))
finally:
+19 -1
View File
@@ -261,10 +261,28 @@ class ReleaseTests(unittest.TestCase):
# Exercise the AppImage shell packager up to its tool boundary,
# without downloading deployment tools or compiling the application.
# Model the explicitly bundled X11 libraries without depending on
# the host's development packages or invoking real deployment tools.
libraries = root / "fixture-libs"
libraries.mkdir()
for name in ("libxkbcommon-x11.so.0", "libxkbcommon.so.0"):
shutil.copyfile("/bin/true", libraries / name)
pkg_config = root / "bin/pkg-config"
pkg_config.write_text(
"#!/usr/bin/env python3\n"
"import sys\n"
"assert sys.argv[1:] == ['--variable=libdir', 'xkbcommon-x11']\n"
f"print({str(libraries)!r})\n"
)
pkg_config.chmod(0o755)
deploy = root / "bin/linuxdeploy"
deploy.write_text('''#!/usr/bin/env python3
import pathlib, sys
import pathlib, shutil, sys
appdir = pathlib.Path(sys.argv[sys.argv.index("--appdir") + 1])
library = pathlib.Path(sys.argv[sys.argv.index("--library") + 1])
assert library.name == "libxkbcommon-x11.so.0"
for name in ("libxkbcommon-x11.so.0", "libxkbcommon.so.0"):
shutil.copyfile(library.parent / name, appdir / "usr/lib" / name)
(appdir / "com.flectar.mail.desktop").symlink_to("usr/share/applications/com.flectar.mail.desktop")
''')
pack = root / "bin/appimagetool"
+10
View File
@@ -1103,6 +1103,16 @@ fn float_text_wrap_and_clear() {
if let PositionedLayoutItem::GlyphRun(run) = item {
let left = origin.x + run.offset() / inline.layout.scale();
let right = left + run.advance() / inline.layout.scale();
// Parley 0.12 includes trailing whitespace in a run's
// advance. That whitespace may hang beyond the line's
// edge, but must not count as text overlapping a float.
let content_end = origin.x
+ (line.metrics().inline_min_coord
+ line.metrics().offset
+ line.metrics().advance
- line.metrics().hanging_advance)
/ inline.layout.scale();
let right = right.min(content_end);
assert!(
if direction == "left" {
left >= pos.x + 80.0 + 7.0