From 8b6418012840e13c54941581e5536a9723e69bea Mon Sep 17 00:00:00 2001 From: tuturu-tech Date: Tue, 26 Mar 2024 15:58:41 +0100 Subject: [PATCH] install properties in pytest workflow, fetch remappings in harness tests --- .github/workflows/pytest.yml | 6 ++++++ tests/test_harness.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 81a8c54..64fa448 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -41,6 +41,12 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 + + - name: Install Foundry dependencies + uses: forge install crytic/properties + + - name: Set remappings + uses: forge remappings > remappings.txt - name: Run tests run: | diff --git a/tests/test_harness.py b/tests/test_harness.py index 2efe166..aeabab9 100644 --- a/tests/test_harness.py +++ b/tests/test_harness.py @@ -5,6 +5,7 @@ from slither import Slither from slither.core.declarations.contract import Contract from slither.core.declarations.function_contract import FunctionContract +from fuzz_utils.utils.remappings import find_remappings from fuzz_utils.template.HarnessGenerator import HarnessGenerator @@ -29,7 +30,6 @@ ], "attacks": [], } -remappings = {"properties": "properties/", "solmate": "solmate/"} def test_modifier_filtering() -> None: @@ -174,6 +174,7 @@ def run_harness( expected_functions: set[str], ) -> None: """Sets up the HarnessGenerator""" + remappings = find_remappings(False) config = copy.deepcopy(default_config) slither = Slither(compilation_path)