Skip to content

Commit a1578ec

Browse files
committed
chore: use Batteries test driver directly in the lake file (#15897)
With leanprover/lean4#4261, we can specify a test driver from a dependency. We do this with `Batteries` test driver. Previously, the test driver from `Batteries` was called via `scripts/test.lean` which is now removed.
1 parent 62764f8 commit a1578ec

File tree

2 files changed

+2
-33
lines changed

2 files changed

+2
-33
lines changed

lakefile.lean

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ package mathlib where
5252
leanOptions := mathlibLeanOptions
5353
-- Mathlib also enforces these linter options, which are not active by default.
5454
moreServerOptions := mathlibOnlyLinters
55+
-- Use Batteries' test driver for `lake test`
56+
testDriver := "batteries/test"
5557
-- These are additional settings which do not affect the lake hash,
5658
-- so they can be enabled in CI and disabled locally or vice versa.
5759
-- Warning: Do not put any options here that actually change the olean files,
@@ -132,18 +134,6 @@ lean_exe pole where
132134
-- Executables which import `Lake` must set `-lLake`.
133135
weakLinkArgs := #["-lLake"]
134136

135-
/--
136-
`lake exe test` is a thin wrapper around `lake exe batteries/test`, until
137-
https://github.com/leanprover/lean4/issues/4121 is resolved.
138-
139-
You can also use it as e.g. `lake exe test conv eval_elab` to only run the named tests.
140-
-/
141-
@[test_driver]
142-
lean_exe test where
143-
-- We could add the above `leanOptions` and `moreServerOptions`: currently, these do not take
144-
-- effect as `test` is a `lean_exe`. With a `lean_lib`, it would work...
145-
srcDir := "scripts"
146-
147137
/-!
148138
## Other configuration
149139
-/

scripts/test.lean

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)