Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» move build command to the start of initialization process
Browse files Browse the repository at this point in the history
  • Loading branch information
lukacan committed Feb 7, 2024
1 parent 9776295 commit baca8ba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/client/src/test_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ impl TestGenerator {
};
let root_path = root.to_str().unwrap().to_string();
let commander = Commander::with_root(root_path);
commander.build_programs().await?;

commander.create_program_client_crate().await?;
self.generate_test_files(&root).await?;
self.update_workspace(&root, "trdelnik-tests/poc_tests")
Expand All @@ -117,10 +119,10 @@ impl TestGenerator {
Ok(root) => root,
Err(_) => throw!(Error::BadWorkspace),
};
let new_fuzz_test_dir = self.generate_fuzz_test_files(&root).await?;

let root_path = root.to_str().unwrap().to_string();
let commander = Commander::with_root(root_path);
commander.build_programs().await?;
let new_fuzz_test_dir = self.generate_fuzz_test_files(&root).await?;
self.build_program_client(&commander, new_fuzz_test_dir)
.await?;
self.update_gitignore(
Expand All @@ -132,7 +134,6 @@ impl TestGenerator {
/// Builds and generates programs for `program_client` module
#[throws]
async fn build_program_client(&self, commander: &Commander, new_fuzz_test_dir: PathBuf) {
commander.build_programs().await?;
commander.generate_program_client_deps().await?;
commander
.generate_program_client_lib_rs(Some(new_fuzz_test_dir))
Expand Down

0 comments on commit baca8ba

Please sign in to comment.