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

chore: Remove legacy-ssa tests #2044

Merged
merged 2 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 3 additions & 7 deletions crates/nargo_cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ fn main() {
let destination = Path::new(&out_dir).join("prove_and_verify.rs");
let mut test_file = File::create(destination).unwrap();

generate_tests(&mut test_file, false);
generate_tests(&mut test_file, true);
generate_tests(&mut test_file);
}

fn load_conf(conf_path: &Path) -> BTreeMap<String, Vec<String>> {
Expand All @@ -54,15 +53,15 @@ fn load_conf(conf_path: &Path) -> BTreeMap<String, Vec<String>> {
conf_data
}

fn generate_tests(test_file: &mut File, legacy_ssa: bool) {
fn generate_tests(test_file: &mut File) {
// Try to find the directory that Cargo sets when it is running; otherwise fallback to assuming the CWD
// is the root of the repository and append the crate path
let manifest_dir = match std::env::var("CARGO_MANIFEST_DIR") {
Ok(dir) => PathBuf::from(dir),
Err(_) => std::env::current_dir().unwrap().join("crates").join("nargo_cli"),
};
// Choose the test directory depending on whether we are in the legacy SSA module or not
let test_sub_dir = if legacy_ssa { "test_data" } else { "test_data_ssa_refactor" };
let test_sub_dir = "test_data_ssa_refactor";
let test_data_dir = manifest_dir.join("tests").join(test_sub_dir);
let config_path = test_data_dir.join("config.toml");

Expand Down Expand Up @@ -99,9 +98,6 @@ fn prove_and_verify_{test_sub_dir}_{test_name}() {{
let mut cmd = Command::cargo_bin("nargo").unwrap();
cmd.arg("--program-dir").arg(test_program_dir);
cmd.arg(if {is_workspace} {{ "test" }} else {{ "execute" }});
if {legacy_ssa} {{
cmd.arg("--legacy-ssa");
}};


if {should_fail} {{
Expand Down
5 changes: 0 additions & 5 deletions crates/nargo_cli/tests/test_data/1_mul/Nargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions crates/nargo_cli/tests/test_data/1_mul/Prover.toml

This file was deleted.

9 changes: 0 additions & 9 deletions crates/nargo_cli/tests/test_data/1_mul/src/main.nr

This file was deleted.

1 change: 0 additions & 1 deletion crates/nargo_cli/tests/test_data/1_mul/target/main.json

This file was deleted.

Binary file not shown.
5 changes: 0 additions & 5 deletions crates/nargo_cli/tests/test_data/2_div/Nargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions crates/nargo_cli/tests/test_data/2_div/Prover.toml

This file was deleted.

7 changes: 0 additions & 7 deletions crates/nargo_cli/tests/test_data/2_div/src/main.nr

This file was deleted.

1 change: 0 additions & 1 deletion crates/nargo_cli/tests/test_data/2_div/target/main.json

This file was deleted.

Binary file not shown.
5 changes: 0 additions & 5 deletions crates/nargo_cli/tests/test_data/3_add/Nargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions crates/nargo_cli/tests/test_data/3_add/Prover.toml

This file was deleted.

8 changes: 0 additions & 8 deletions crates/nargo_cli/tests/test_data/3_add/src/main.nr

This file was deleted.

1 change: 0 additions & 1 deletion crates/nargo_cli/tests/test_data/3_add/target/main.json

This file was deleted.

Binary file not shown.
5 changes: 0 additions & 5 deletions crates/nargo_cli/tests/test_data/4_sub/Nargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions crates/nargo_cli/tests/test_data/4_sub/Prover.toml

This file was deleted.

5 changes: 0 additions & 5 deletions crates/nargo_cli/tests/test_data/4_sub/src/main.nr

This file was deleted.

1 change: 0 additions & 1 deletion crates/nargo_cli/tests/test_data/4_sub/target/main.json

This file was deleted.

Binary file not shown.
5 changes: 0 additions & 5 deletions crates/nargo_cli/tests/test_data/5_over/Nargo.toml

This file was deleted.

2 changes: 0 additions & 2 deletions crates/nargo_cli/tests/test_data/5_over/Prover.toml

This file was deleted.

9 changes: 0 additions & 9 deletions crates/nargo_cli/tests/test_data/5_over/src/main.nr

This file was deleted.

1 change: 0 additions & 1 deletion crates/nargo_cli/tests/test_data/5_over/target/main.json

This file was deleted.

Binary file not shown.
5 changes: 0 additions & 5 deletions crates/nargo_cli/tests/test_data/6/Nargo.toml

This file was deleted.

39 changes: 0 additions & 39 deletions crates/nargo_cli/tests/test_data/6/Prover.toml

This file was deleted.

20 changes: 0 additions & 20 deletions crates/nargo_cli/tests/test_data/6/src/main.nr

This file was deleted.

1 change: 0 additions & 1 deletion crates/nargo_cli/tests/test_data/6/target/main.json

This file was deleted.

Binary file removed crates/nargo_cli/tests/test_data/6/target/witness.tr
Binary file not shown.
5 changes: 0 additions & 5 deletions crates/nargo_cli/tests/test_data/6_array/Nargo.toml

This file was deleted.

9 changes: 0 additions & 9 deletions crates/nargo_cli/tests/test_data/6_array/Prover.toml

This file was deleted.

54 changes: 0 additions & 54 deletions crates/nargo_cli/tests/test_data/6_array/src/main.nr

This file was deleted.

1 change: 0 additions & 1 deletion crates/nargo_cli/tests/test_data/6_array/target/main.json

This file was deleted.

Binary file not shown.
5 changes: 0 additions & 5 deletions crates/nargo_cli/tests/test_data/7/Nargo.toml

This file was deleted.

38 changes: 0 additions & 38 deletions crates/nargo_cli/tests/test_data/7/Prover.toml

This file was deleted.

10 changes: 0 additions & 10 deletions crates/nargo_cli/tests/test_data/7/src/main.nr

This file was deleted.

Loading