Skip to content

Commit

Permalink
chore: use Batteries test driver directly in the lake file (#15897)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mattrobball committed Oct 25, 2024
1 parent 62764f8 commit a1578ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 33 deletions.
14 changes: 2 additions & 12 deletions lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ package mathlib where
leanOptions := mathlibLeanOptions
-- Mathlib also enforces these linter options, which are not active by default.
moreServerOptions := mathlibOnlyLinters
-- Use Batteries' test driver for `lake test`
testDriver := "batteries/test"
-- These are additional settings which do not affect the lake hash,
-- so they can be enabled in CI and disabled locally or vice versa.
-- Warning: Do not put any options here that actually change the olean files,
Expand Down Expand Up @@ -132,18 +134,6 @@ lean_exe pole where
-- Executables which import `Lake` must set `-lLake`.
weakLinkArgs := #["-lLake"]

/--
`lake exe test` is a thin wrapper around `lake exe batteries/test`, until
https://github.com/leanprover/lean4/issues/4121 is resolved.
You can also use it as e.g. `lake exe test conv eval_elab` to only run the named tests.
-/
@[test_driver]
lean_exe test where
-- We could add the above `leanOptions` and `moreServerOptions`: currently, these do not take
-- effect as `test` is a `lean_exe`. With a `lean_lib`, it would work...
srcDir := "scripts"

/-!
## Other configuration
-/
Expand Down
21 changes: 0 additions & 21 deletions scripts/test.lean

This file was deleted.

0 comments on commit a1578ec

Please sign in to comment.