Skip to content

Commit

Permalink
serial test
Browse files Browse the repository at this point in the history
  • Loading branch information
ctian1 committed Feb 10, 2024
1 parent 38a9261 commit 25e9c65
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
39 changes: 39 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ serde_json = { version = "1.0.113", default-features = false, features = [
] }
k256 = { version = "0.13.3", features = ["expose-field"] }
elliptic-curve = "0.13.8"
serial_test = "3.0.0"

[dev-dependencies]
criterion = "0.5.1"
Expand Down
9 changes: 8 additions & 1 deletion core/src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,10 @@ impl Runtime {
#[cfg(test)]
pub mod tests {

use crate::{runtime::Register, utils::tests::FIBONACCI_ELF};
use crate::{
runtime::Register,
utils::tests::{FIBONACCI_ELF, SSZ_WITHDRAWALS_ELF},
};

use super::{Instruction, Opcode, Program, Runtime};

Expand All @@ -890,6 +893,10 @@ pub mod tests {
Program::from(FIBONACCI_ELF)
}

pub fn ssz_withdrawals_program() -> Program {
Program::from(SSZ_WITHDRAWALS_ELF)
}

pub fn ecall_lwa_program() -> Program {
let instructions = vec![
Instruction::new(Opcode::ADD, 5, 0, 101, false, true),
Expand Down
10 changes: 10 additions & 0 deletions core/src/stark/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,14 @@ pub mod tests {
use crate::runtime::tests::fibonacci_program;
use crate::runtime::tests::simple_memory_program;
use crate::runtime::tests::simple_program;
use crate::runtime::tests::ssz_withdrawals_program;
use crate::runtime::Instruction;
use crate::runtime::Opcode;
use crate::runtime::Program;
use crate::utils;
use crate::utils::prove;
use crate::utils::setup_logger;
use serial_test::serial;

#[test]
fn test_simple_prove() {
Expand Down Expand Up @@ -375,6 +377,14 @@ pub mod tests {
prove(program);
}

#[test]
#[serial]
fn test_ssz_withdrawals_prove() {
setup_logger();
let program = ssz_withdrawals_program();
prove(program);
}

#[test]
fn test_simple_memory_program_prove() {
let program = simple_memory_program();
Expand Down

0 comments on commit 25e9c65

Please sign in to comment.