From 266581120098331eb62ea4baf076a24f6d1b3685 Mon Sep 17 00:00:00 2001 From: William E Bodell III Date: Mon, 7 Aug 2023 17:15:40 -0500 Subject: [PATCH] Fix failing CI, rename bin/echidna to bin/echidna-diffusc, and reintroduce copying bin/echidna-diffusc in installation instructions (#22) --------- Co-authored-by: William E Bodell III * Dev debug failing CI fuzzing (#21) * Rename bin/echidna -> bin/echidna-diffusc * Reintroduce copying ./bin/echidna-diffusc to /usr/local/bin in README installation instructions --------- Co-authored-by: Rappie --- .github/workflows/ci-fork-mode.yml | 4 ++-- .github/workflows/ci-path-mode.yml | 4 ++-- .github/workflows/pytest.yml | 2 +- README.md | 3 ++- bin/{echidna => echidna-diffusc} | Bin diffusc/core/echidna.py | 3 +-- 6 files changed, 8 insertions(+), 8 deletions(-) rename bin/{echidna => echidna-diffusc} (100%) diff --git a/.github/workflows/ci-fork-mode.yml b/.github/workflows/ci-fork-mode.yml index 5e586aa..d33f4aa 100644 --- a/.github/workflows/ci-fork-mode.yml +++ b/.github/workflows/ci-fork-mode.yml @@ -49,8 +49,8 @@ jobs: - name: Install diffusc run: | - pip3 install . - sudo cp bin/echidna /usr/local/bin + pip3 install ".[test]" + sudo cp bin/echidna-diffusc /usr/local/bin solc-select install 0.8.17 solc-select use 0.8.17 diff --git a/.github/workflows/ci-path-mode.yml b/.github/workflows/ci-path-mode.yml index 97f4296..b53d2b3 100644 --- a/.github/workflows/ci-path-mode.yml +++ b/.github/workflows/ci-path-mode.yml @@ -33,8 +33,8 @@ jobs: - name: Install diffusc run: | - pip3 install . - sudo cp bin/echidna /usr/local/bin + pip3 install ".[test]" + sudo cp bin/echidna-diffusc /usr/local/bin solc-select install 0.8.11 solc-select use 0.8.11 diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 57a2cdd..192d503 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -54,7 +54,7 @@ jobs: # Only run coverage on ubuntu-latest. run: | if [ ${{ matrix.os }} = "ubuntu-latest" ]; then - sudo cp bin/echidna /usr/local/bin + sudo cp bin/echidna-diffusc /usr/local/bin TEST_ARGS="--cov=diffusc --cov-append" elif [ ${{ matrix.os }} = "windows-2022" ]; then TEST_ARGS="" diff --git a/README.md b/README.md index 0d82b8f..fad4928 100644 --- a/README.md +++ b/README.md @@ -62,11 +62,12 @@ diffusc ## Setup -After cloning this repo, run the setup script (ideally in a virtual environment): +After cloning this repo, run the setup script (ideally in a virtual environment) and copy the `echidna-diffusc` binary to `/usr/local/bin`: ```bash git clone https://github.com/crytic/diffusc.git cd diffusc pip3 install . +cp bin/echidna-diffusc /usr/local/bin ``` ## Running Diffusc diff --git a/bin/echidna b/bin/echidna-diffusc similarity index 100% rename from bin/echidna rename to bin/echidna-diffusc diff --git a/diffusc/core/echidna.py b/diffusc/core/echidna.py index fdc7fad..4c38130 100644 --- a/diffusc/core/echidna.py +++ b/diffusc/core/echidna.py @@ -22,8 +22,7 @@ def create_echidna_process( except OSError: pass - path_to_echidna_from_prefix = os.path.relpath(ECHIDNA_BIN_PATH, prefix) - call = [path_to_echidna_from_prefix] + call = ["echidna-diffusc"] call.extend([filename]) call.extend(["--config", config]) call.extend(["--contract", contract])