Skip to content

Commit

Permalink
5663: toggling based on an environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanmon committed Apr 10, 2024
1 parent 86496ba commit 1779e19
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions barretenberg/cpp/src/barretenberg/vm/tests/helpers.test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ using Flavor = bb::AvmFlavor;
using FF = Flavor::FF;
using Row = bb::AvmFullRow<bb::fr>;

// To toggle all relevant unit tests with proving, we set the following constant
// to true.
static const bool ENABLE_PROVING_PER_DEFAULT = false;
// To toggle all relevant unit tests with proving, set the env variable "AVM_TESTS_ENABLE_PROVING".
static const bool ENABLE_PROVING = std::getenv("AVM_TESTS_ENABLE_PROVING") != nullptr;

// If the test is expecting a relation to fail, then use validate_trace_check_circuit.
// Otherwise, use validate_trace with a single argument. If the proving needs to be
// enabled all the time in a given test, use validate_trace with setting with_proof = true.
void validate_trace_check_circuit(std::vector<Row>&& trace);
void validate_trace(std::vector<Row>&& trace, bool with_proof = ENABLE_PROVING_PER_DEFAULT);
void validate_trace(std::vector<Row>&& trace, bool with_proof = ENABLE_PROVING);
void mutate_ic_in_trace(std::vector<Row>& trace,
std::function<bool(Row)>&& selectRow,
FF const& newValue,
Expand Down

0 comments on commit 1779e19

Please sign in to comment.