Skip to content

Commit

Permalink
add script for executing all pies
Browse files Browse the repository at this point in the history
  • Loading branch information
HermanObst committed Oct 28, 2024
1 parent fc399f4 commit c191f65
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/bin/output_segment/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ async fn main() {
.try_into()
.expect("Block number is too big");

log::info!("Runnin SNOS for block number: {}", block_number);

let endpoint = "http://localhost:9545";
let (snos_pie, _snos_output) = prove_block(block_number, &endpoint, LayoutName::all_cairo, true)
.await
Expand Down
28 changes: 28 additions & 0 deletions run_output_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# Set the base directory and report file
BASE_DIR="./crates/bin/output_segment/reference-pies"
REPORT_FILE="report.log"

# Clear the report file if it exists
> "$REPORT_FILE"

# Iterate over each file in the directory
for FILE in "$BASE_DIR"/*; do
if [[ -f "$FILE" ]]; then
echo "Processing $FILE..."

# Run the command with the current file path
RUST_LOG="debug,minilp::solver=info" cargo run -p output_segment --release -- --pie-path "$FILE"

# Check if the command was successful
if [[ $? -eq 0 ]]; then
echo "Success: $FILE" | tee -a "$REPORT_FILE"
else
echo "Failure: $FILE" | tee -a "$REPORT_FILE"
fi
fi
done

echo "Report written to $REPORT_FILE"

0 comments on commit c191f65

Please sign in to comment.