Skip to content

Commit

Permalink
cargo odra test does not fail if Odra.toml is empty (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpob authored Jun 27, 2024
1 parent 1975815 commit 239b1e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/actions/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ impl TestAction<'_> {
if self.backend.is_none() {
self.test_odra_vm();
} else {
if self.project.odra_toml().contracts.is_empty() {
log::warn("No contracts found in Odra.toml file.");
}
if !self.skip_build {
self.build_wasm_files();
}
Expand Down
1 change: 1 addition & 0 deletions src/odra_toml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ impl Contract {
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct OdraToml {
/// Contracts in the project.
#[serde(default)]
pub contracts: Vec<Contract>,
#[serde(skip)]
pub location: PathBuf,
Expand Down

0 comments on commit 239b1e9

Please sign in to comment.