-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: standardize backend CLI command functions (#2517)
- Loading branch information
1 parent
98a0694
commit 6bfac13
Showing
10 changed files
with
154 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Reference: https://github.com/AztecProtocol/aztec-packages/blob/master/circuits/cpp/barretenberg/cpp/src/barretenberg/bb/main.cpp | ||
|
||
mod contract; | ||
mod gates; | ||
mod prove; | ||
mod verify; | ||
mod write_vk; | ||
|
||
pub(crate) use contract::ContractCommand; | ||
pub(crate) use gates::GatesCommand; | ||
pub(crate) use prove::ProveCommand; | ||
pub(crate) use verify::VerifyCommand; | ||
pub(crate) use write_vk::WriteVkCommand; | ||
|
||
#[test] | ||
#[serial_test::serial] | ||
fn no_command_provided_works() { | ||
// This is a simple test to check that the binaries work | ||
|
||
let backend = crate::get_bb(); | ||
|
||
let output = std::process::Command::new(backend.binary_path()) | ||
.output() | ||
.expect("Failed to execute command"); | ||
|
||
let stderr = String::from_utf8_lossy(&output.stderr); | ||
assert_eq!(stderr, "No command provided.\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.