Skip to content
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

🧑‍💻 move build command to the start of initialization process #119

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading