[tests] Don't compile the test EDN into the test binary #120
Labels
No labels
A-build
A-cli
A-core
A-design
A-edn
A-ffi
A-query
A-sdk
A-sdk-android
A-sdk-ios
A-sync
A-transact
A-views
A-vocab
P-Android
P-desktop
P-iOS
bug
correctness
dependencies
dev-ergonomics
discussion
documentation
duplicate
enhancement
enquiry
good first bug
good first issue
help wanted
hygiene
in progress
invalid
question
ready
size
speed
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: greg/mentat#120
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now, I'm using include_str! to get the EDN fixtures into our tests. However, this means any change to the test data prompts a recompile, which is slow!
This ticket tracks updating the code around
9be487ca7d/db/src/db.rs (L921)
and9be487ca7d/db/src/db.rs (L943)
to instead onlyinclude_str!
a single file listing the test fixture filenames, and then dynamically reading the test fixture contents at test time.That'll make changes to the test list prompt a recompile, but otherwise make it fast to iterate on the test file itself.
Bonus points for using a
build.rs
snippet to expand the test list at compile time, generating functions for reach test file. That will produce bettercargo test
output than a single test that runs through all the test fixtures.