From 59d70c290a8079b1da6ab9d0477c4eef0d84b37d Mon Sep 17 00:00:00 2001 From: cyberthirst Date: Wed, 30 Oct 2024 11:12:57 +0100 Subject: [PATCH] add support to exclude contracts --- scripts/symbolic_tests.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/scripts/symbolic_tests.sh b/scripts/symbolic_tests.sh index 0aa801d848..ad656c9ded 100755 --- a/scripts/symbolic_tests.sh +++ b/scripts/symbolic_tests.sh @@ -9,6 +9,16 @@ TARGET_DIR="examples" SPECIFIC_CONTRACT="" DEBUG=false +# Contracts to exclude from testing +EXCLUDED_CONTRACTS=( + "examples/wallet/wallet.vy" # CopySlice with a symbolically sized region not currently implemented + "examples/voting/ballot.vy" # loooong + "examples/auctions/blind_auction.vy" # loooong + "examples/tokens/ERC4626.vy" # loong + "examples/tokens/ERC1155ownable.vy" #looong + "examples/tokens/ERC721.vy" # loongs + "examples/name_registry/name_registry.vy" # again copy slice? +) # Parse arguments while [[ $# -gt 0 ]]; do @@ -40,6 +50,17 @@ while [[ $# -gt 0 ]]; do esac done +# Function to check if contract should be excluded +is_excluded() { + local contract=$1 + for excluded in "${EXCLUDED_CONTRACTS[@]}"; do + if [ "$contract" = "$excluded" ]; then + return 0 + fi + done + return 1 +} + # Function to run hevm equivalence check check_equivalence() { local contract=$1 @@ -64,6 +85,11 @@ check_equivalence() { test_contract() { local contract=$1 + if is_excluded "$contract"; then + echo "Skipping excluded contract: $contract" + return 0 + fi + echo "Processing $contract..." if ! check_equivalence "$contract"; then