Skip to content

Truly independent web browser

Tests: Build the Rust test binaries in less than half the time

Andreas Klingc97e3f68afec
diff --git a/Cargo.toml b/Cargo.toml
index 5839ac86e7a..f353c408bd9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -43,6 +43,10 @@ incremental = false
codegen-units = 1
lto = true
+# Line tables keep file and line numbers in panic backtraces. Full debug info doubles the time to build the tests.
+[profile.test]
+debug = "line-tables-only"
+
[workspace.lints.rust]
unexpected_cfgs = { level = "deny", check-cfg = ["cfg(ladybird_gc_lints)"] }
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index ca8c199cc82..ef8ed55c206 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -42,6 +42,8 @@ if (NOT WIN32)
"LLVM_LIBC_INCLUDE_DIR=${LLVM_LIBC_INCLUDE_DIR}/llvm-libc"
)
+ # --all-targets leaves out doctests. The workspace has none that run, but scheduling them would still make Cargo
+ # compile the plain library of every crate, on top of its unit test binary.
set(rust_workspace_test_command
"${CMAKE_COMMAND}" -E env
${rust_test_env}
@@ -50,6 +52,7 @@ if (NOT WIN32)
"${RUST_CARGO}" test --workspace
--manifest-path "${LADYBIRD_SOURCE_DIR}/Cargo.toml"
--target "${RUST_TARGET_TRIPLE}"
+ --all-targets
)
set(flap_test_command
"${CMAKE_COMMAND}" -E env