-
Notifications
You must be signed in to change notification settings - Fork 954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test wasms should be loaded via namada_test_utils
crate
#893
Conversation
966e9f1
to
63f3a21
Compare
I have taken the simpler #894 for 0.14.0 - let's rebase this |
63f3a21
to
0a18a60
Compare
// crudely find the root of the repo, we can't rely on the `.git` | ||
// directory being present, so look instead for the presence of a | ||
// CHANGELOG.md file | ||
let repo_root = cwd | ||
.ancestors() | ||
.find(|path| path.join("CHANGELOG.md").exists()) | ||
.unwrap_or_else(|| { | ||
panic!( | ||
"Couldn't find the root of the repository for the current \ | ||
working directory {}", | ||
cwd.to_string_lossy() | ||
) | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have the .git
directory when running tests in CI, so this code crudely looks for the ancestor directory which has a CHANGELOG.md
file, there is probably a better way to do this.
namada_test_utils
crate enumerating test wasmsnamada_test_wasms
crate
pls update wasm |
I've redone this PR on top of 0.14 |
namada_test_wasms
cratenamada_test_utils
crate
pls update wasm |
* james/mainline/namada-test-utils-wasms: Update shared crate to use test utils Update namada_tests crate to use test utils Don't rely on the presence of .git directory Test that all test wasm files are present Update wasm crate to use test utils Update namada_apps to use test wasm utility code Add changelog Add test wasm utility code to test_utils
Relates to #102 - this PR lays some groundwork for moving our
wasm_for_tests
directory into the single wasm workspace.We use
wasm_for_tests
wasms in tests across multiple crates (namada_apps
,namada
,namada_tests
,namada_wasm
) - but we duplicate logic for getting the relative paths to and reading test wasms. This PR consolidates that logic to one place, so that it will be easier to migrate the directory later on.TestWasms
enum totest_utils/src/lib.rs
TestWasms
enum instead