Skip to content

Commit

Permalink
check with updated scripts with local paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jaisnan committed Jul 26, 2024
1 parent 8a07c8b commit 72160bc
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions scripts/check-kani.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,35 @@
VERIFY_RUST_STD_DIR="/tmp/verify-rust-std"
KANI_DIR="/tmp/kani"

# Checkout your local repository
echo "Checking out local repository..."
echo
cd "$VERIFY_RUST_STD_DIR"

# Checkout the Kani repository
echo "Checking out Kani repository..."
echo
git clone --depth 1 -b features/verify-rust-std https://github.com/model-checking/kani.git "$KANI_DIR"

# Setup dependencies for Kani
echo "Setting up dependencies for Kani..."
echo
cd "$KANI_DIR"
./scripts/setup/ubuntu/install_deps.sh

# Build Kani
echo "Building Kani..."
echo
cargo build-dev --release
echo "$(pwd)/scripts" >> $PATH
RUNNER_TEMP=$(mktemp -d)

# # Checkout your local repository
# echo "Checking out local repository..."
# echo
# cd "$VERIFY_RUST_STD_DIR"

# # Checkout the Kani repository
# echo "Checking out Kani repository..."
# echo
# git clone --depth 1 -b features/verify-rust-std https://github.com/model-checking/kani.git "$KANI_DIR"

# # Setup dependencies for Kani
# echo "Setting up dependencies for Kani..."
# echo
# cd "$KANI_DIR"
# ./scripts/setup/ubuntu/install_deps.sh

# # Build Kani
# echo "Building Kani..."
# echo
# cargo build-dev --release
# echo "$(pwd)/scripts" >> $PATH

# Run tests
echo "Running tests..."
echo
cd "$VERIFY_RUST_STD_DIR"
kani verify-std -Z unstable-options ./library --target-dir "$RUNNER_TEMP" -Z function-contracts -Z mem-predicates -Z ptr-to-ref-cast-checks
RUST_BACKTRACE=1
/tmp/kani/scripts/kani verify-std -Z unstable-options /tmp/verify-rust-std/library --target-dir "$RUNNER_TEMP" -Z function-contracts -Z mem-predicates -Z ptr-to-ref-cast-checks

echo "Tests completed."
echo
Expand Down

0 comments on commit 72160bc

Please sign in to comment.