Skip to content

Commit

Permalink
chore(ci): use mock backend for all tests (#2670)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Sep 13, 2023
1 parent dc3358b commit c9b710f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 1 addition & 7 deletions tooling/acvm_backend_barretenberg/src/cli/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ impl InfoCommand {

#[test]
fn info_command() -> Result<(), BackendError> {
use acvm::acir::circuit::black_box_functions::BlackBoxFunc;
use acvm::acir::circuit::opcodes::{BlackBoxFuncCall, Opcode};
use acvm::acir::circuit::opcodes::Opcode;

use acvm::acir::native_types::Expression;

Expand All @@ -85,10 +84,5 @@ fn info_command() -> Result<(), BackendError> {
assert!(matches!(language, Language::PLONKCSat { width: 3 }));
assert!(is_opcode_supported(&Opcode::Arithmetic(Expression::default())));

assert!(!is_opcode_supported(&Opcode::BlackBoxFuncCall(
#[allow(deprecated)]
BlackBoxFuncCall::dummy(BlackBoxFunc::Keccak256)
)));

Ok(())
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const INFO_RESPONSE: &str = r#"{
"range",
"sha256",
"blake2s",
"keccak256",
"schnorr_verify",
"pedersen",
"hash_to_field_128_security",
Expand Down
3 changes: 3 additions & 0 deletions tooling/nargo_cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ fn execution_success_{test_name}() {{
let test_program_dir = PathBuf::from("{test_dir}");
let mut cmd = Command::cargo_bin("nargo").unwrap();
cmd.env("NARGO_BACKEND_PATH", path_to_mock_backend());
cmd.arg("--program-dir").arg(test_program_dir);
cmd.arg("execute");
Expand Down Expand Up @@ -158,6 +159,7 @@ fn compile_success_contract_{test_name}() {{
let test_program_dir = PathBuf::from("{test_dir}");
let mut cmd = Command::cargo_bin("nargo").unwrap();
cmd.env("NARGO_BACKEND_PATH", path_to_mock_backend());
cmd.arg("--program-dir").arg(test_program_dir);
cmd.arg("compile");
Expand Down Expand Up @@ -195,6 +197,7 @@ fn compile_failure_{test_name}() {{
let test_program_dir = PathBuf::from("{test_dir}");
let mut cmd = Command::cargo_bin("nargo").unwrap();
cmd.env("NARGO_BACKEND_PATH", path_to_mock_backend());
cmd.arg("--program-dir").arg(test_program_dir);
cmd.arg("execute");
Expand Down

0 comments on commit c9b710f

Please sign in to comment.