Skip to content

Commit

Permalink
fix: disable phase2 tests that require external files
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptonemo committed Nov 6, 2020
1 parent 1038392 commit 0925521
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
11 changes: 8 additions & 3 deletions phase2/tests/large.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ use rand::thread_rng;

use mimc::{mimc as mimc_hash, MiMCDemo, MIMC_ROUNDS};

// This test is marked as ignore because we haven't checked-in the phase1 file required for this
// test to pass when run via CI. To run this test you must have the correct phase1 params file in
// the top level directory of this crate.
#[test]
#[ignore]
fn test_large_params() {
//test_large_params_inner()
}

// This test is marked as ignore because we haven't checked-in the phase1 file required for this
// test to pass when run via CI. To run this test you must have the correct phase1 params file in
// the top level directory of this crate.
#[allow(dead_code)]
fn test_large_params_inner() {
assert!(
Path::new("./phase1radix2m10").exists(),
"the phase1 file `phase1radix2m10` must be in the crate's top level directory"
Expand Down
22 changes: 16 additions & 6 deletions phase2/tests/small.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ use rand_chacha::ChaChaRng;

use mimc::{mimc as mimc_hash, MiMCDemo, MIMC_ROUNDS};

// This test is marked as ignore because we haven't checked-in the phase1 file required for this
// test to pass when run via CI. To run this test you must have the correct phase1 params file in
// the top level directory of this crate.
#[test]
#[ignore]
fn test_mimc_small_params() {
//test_mimc_small_params_inner()
}

// This test is marked as ignore because we haven't checked-in the phase1 file required for this
// test to pass when run via CI. To run this test you must have the correct phase1 params file in
// the top level directory of this crate.
#[allow(dead_code)]
fn test_mimc_small_params_inner() {
assert!(
Path::new("./phase1radix2m10").exists(),
"the phase1 file `phase1radix2m10` must be in the crate's top level directory"
Expand Down Expand Up @@ -157,12 +162,17 @@ fn test_mimc_small_params() {
assert!(verify_proof(&pvk, &proof, &[image]).unwrap());
}

// This test is marked as ignore because we haven't checked-in the phase1 file required for this
// test to pass when run via CI. To run this test you must have the correct phase1 params file in
// the top level directory of this crate.
#[test]
#[ignore]
fn test_small_file_io() {
//test_small_file_io_inner()
}

// This test is marked as ignore because we haven't checked-in the phase1 file required for this
// test to pass when run via CI. To run this test you must have the correct phase1 params file in
// the top level directory of this crate.
#[allow(dead_code)]
fn test_small_file_io_inner() {
const LARGE_PATH: &str = "./tests/large_params";
const SMALL_PATH: &str = "./tests/small_params";

Expand Down

0 comments on commit 0925521

Please sign in to comment.