Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tool name in files and links #23

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ body:
attributes:
value: |
Please check the issues tab to avoid duplicates.
If you are having difficulty installing test-generator,
If you are having difficulty installing fuzz-utils,
please head over to the "Discussions" page.
Thanks for taking the time to fill out this bug report!
type: markdown
Expand All @@ -27,8 +27,8 @@ body:
-
attributes:
description: |
What version of test-generator are you running?
Run `test-generator --version`
What version of fuzz-utils are you running?
Run `fuzz-utils --version`
label: "Version:"
id: version
type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
value: |
Please check the issues tab to avoid duplicates.

Thanks for providing feedback on test-generator!
Thanks for providing feedback on fuzz-utils!
- type: textarea
attributes:
label: Describe the desired feature
Expand Down
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Contributing to Test-generator
# Contributing to fuzz-utils

First, thanks for your interest in contributing to `test-generator`! We welcome and appreciate all contributions, including bug reports, feature suggestions, tutorials/blog posts, and code improvements.
First, thanks for your interest in contributing to `fuzz-utils`! We welcome and appreciate all contributions, including bug reports, feature suggestions, tutorials/blog posts, and code improvements.

If you're unsure where to start, we recommend our [`good first issue`](https://github.com/crytic/test-generator/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) and [`help wanted`](https://github.com/crytic/test-generator/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) issue labels.
If you're unsure where to start, we recommend our [`good first issue`](https://github.com/crytic/fuzz-utils/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) and [`help wanted`](https://github.com/crytic/fuzz-utils/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) issue labels.

## Bug reports and feature suggestions

Expand All @@ -14,7 +14,7 @@ Questions can be submitted to the "Discussions" page, and you may also join our

## Code

Test-generator uses the pull request contribution model. Please make an account on Github, fork this repo, and submit code contributions via pull request. For more documentation, look [here](https://guides.github.com/activities/forking/).
`fuzz-utils` uses the pull request contribution model. Please make an account on Github, fork this repo, and submit code contributions via pull request. For more documentation, look [here](https://guides.github.com/activities/forking/).

Some pull request guidelines:

Expand All @@ -26,7 +26,7 @@ Some pull request guidelines:

## Directory Structure

Below is a rough outline of test-generator's design:
Below is a rough outline of fuzz-utils's design:

```text
.
Expand All @@ -39,24 +39,24 @@ Below is a rough outline of test-generator's design:

## Development Environment

`test-generator` currently runs requires at least Python3.10 so make sure you have a sufficiently up-to-date installation by running `python --version`. We recommend [pyenv](https://github.com/pyenv/pyenv) to manage python versions.
`fuzz-utils` currently runs requires at least Python3.10 so make sure you have a sufficiently up-to-date installation by running `python --version`. We recommend [pyenv](https://github.com/pyenv/pyenv) to manage python versions.

To start working on modifications to test-generator locally, run:
To start working on modifications to fuzz-utils locally, run:
```bash
git clone https://github.com/crytic/test-generator
cd test-generator
git clone https://github.com/crytic/fuzz-utils
cd fuzz-utils
make dev
```
This will create a virtual environment, ./env/, in the root of the repository and install dependencies.

To run commands using your development version of `test-generator`, run:
To run commands using your development version of `fuzz-utils`, run:
```bash
source ./env/bin/activate
```

### Setting up IDE-based debugging
1. Configure your IDE to use `./env/bin/python` as the interpreter.
2. Use `test-generator` as the entrypoint for the debugger.
2. Use `fuzz-utils` as the entrypoint for the debugger.
3. Pycharm specific: Set the environment working directory to `./env/bin/`

To run the unit tests, you need to clone this repository and run `make test`. Run a specific test with `make test TESTS=$test_name`. The names of tests can be obtained with `pytest tests --collect-only`.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dev: $(VENV)/pyvenv.cfg

.PHONY: run
run: $(VENV)/pyvenv.cfg
@. $(VENV_BIN)/activate && test-generator $(ARGS)
@. $(VENV_BIN)/activate && fuzz-utils $(ARGS)

$(VENV)/pyvenv.cfg: pyproject.toml
# Create our Python 3 virtual environment
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Install script for test-generator package
Install script for fuzz-utils package
"""
import setuptools

Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def __init__(self, target: str, target_path: str, corpus_dir: str):
)

def echidna_generate_tests(self) -> None:
"""Runs the test-generator tool for an Echidna corpus"""
"""Runs the fuzz-utils tool for an Echidna corpus"""
self.echidna_generator.create_poc()

def medusa_generate_tests(self) -> None:
"""Runs the test-generator tool for a Medusa corpus"""
"""Runs the fuzz-utils tool for a Medusa corpus"""
self.medusa_generator.create_poc()


Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/src/BasicTypes.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma solidity ^0.8.0;

// Ran from test directory: echidna . --contract BasicTypes --test-mode assertion --test-limit 100000 --corpus-dir echidna-corpora/corpus-basic --crytic-args "--foundry-ignore-compile"
// Ran from test directory: test-generator ./src/BasicTypes.sol --corpus-dir echidna-corpora/corpus-basic --contract "BasicTypes" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
// Ran from test directory: fuzz-utils ./src/BasicTypes.sol --corpus-dir echidna-corpora/corpus-basic --contract "BasicTypes" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
contract BasicTypes {

// ------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/src/DynamicArrays.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma solidity ^0.8.0;

// Ran from test directory: echidna . --contract DynamicArrays --test-mode assertion --test-limit 100000 --corpus-dir echidna-corpora/corpus-dyn-arr --crytic-args "--foundry-ignore-compile"
// Ran from test directory: test-generator ./src/DynamicArrays.sol --corpus-dir echidna-corpora/corpus-dyn-arr --contract "DynamicArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
// Ran from test directory: fuzz-utils ./src/DynamicArrays.sol --corpus-dir echidna-corpora/corpus-dyn-arr --contract "DynamicArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
contract DynamicArrays {

// ------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/src/FixedArrays.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma solidity ^0.8.0;

// Ran from test directory: echidna . --contract FixedArrays --test-mode assertion --test-limit 100000 --corpus-dir echidna-corpora/corpus-fixed-arr --crytic-args "--foundry-ignore-compile"
// Ran from test directory: test-generator ./src/FixedArrays.sol --corpus-dir echidna-corpora/corpus-fixed-arr --contract "FixedArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
// Ran from test directory: fuzz-utils ./src/FixedArrays.sol --corpus-dir echidna-corpora/corpus-fixed-arr --contract "FixedArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
contract FixedArrays {

// ------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/src/MultiDimensionalDynamicArrays.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma solidity ^0.8.0;

// Ran from test directory: echidna . --contract MultiDimensionalDynamicArrays --test-mode assertion --test-limit 100000 --corpus-dir echidna-corpora/corpus-multi-dyn-arr --crytic-args "--foundry-ignore-compile"
// Ran from test directory: test-generator ./src/MultiDimensionalDynamicArrays.sol --corpus-dir echidna-corpora/corpus-multi-dyn-arr --contract "MultiDimensionalDynamicArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
// Ran from test directory: fuzz-utils ./src/MultiDimensionalDynamicArrays.sol --corpus-dir echidna-corpora/corpus-multi-dyn-arr --contract "MultiDimensionalDynamicArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
contract MultiDimensionalDynamicArrays {
// ----- 2-dimensional arrays ------

Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/src/MultiDimensionalFixedArrays.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma solidity ^0.8.0;

// Ran from test directory: echidna . --contract MultiDimensionalFixedArrays --test-mode assertion --test-limit 100000 --corpus-dir echidna-corpora/corpus-multi-fixed-arr --crytic-args "--foundry-ignore-compile"
// Ran from test directory: test-generator ./src/MultiDimensionalFixedArrays.sol --corpus-dir echidna-corpora/corpus-multi-fixed-arr --contract "MultiDimensionalFixedArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
// Ran from test directory: fuzz-utils ./src/MultiDimensionalFixedArrays.sol --corpus-dir echidna-corpora/corpus-multi-fixed-arr --contract "MultiDimensionalFixedArrays" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
contract MultiDimensionalFixedArrays {
/* ----- 2-dimensional arrays */

Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/src/TimeAdvancement.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma solidity ^0.8.0;

// Ran from test directory: echidna . --contract TimeAdvancement --test-mode assertion --test-limit 10000 --corpus-dir echidna-corpora/corpus-time --crytic-args "--foundry-ignore-compile"
// Ran from test directory: test-generator ./src/TupleTypes.sol --corpus-dir echidna-corpora/corpus-struct --contract "TupleTypes" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
// Ran from test directory: fuzz-utils ./src/TupleTypes.sol --corpus-dir echidna-corpora/corpus-struct --contract "TupleTypes" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna

contract TimeAdvancement {
bool timeSet;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/src/TupleTypes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.0;
import "./IStruct.sol";

// Ran from test directory: echidna . --contract TupleTypes --test-mode assertion --test-limit 100000 --corpus-dir echidna-corpora/corpus-struct --crytic-args "--foundry-ignore-compile"
// Ran from test directory: test-generator ./src/TupleTypes.sol --corpus-dir echidna-corpora/corpus-struct --contract "TupleTypes" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
// Ran from test directory: fuzz-utils ./src/TupleTypes.sol --corpus-dir echidna-corpora/corpus-struct --contract "TupleTypes" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
contract TupleTypes {
struct ElementaryStruct {
uint256 uintType;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/src/ValueTransfer.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pragma solidity ^0.8.0;

// Ran from tests/test_data/ directory: echidna . --contract ValueTransfer --test-mode assertion --test-limit 1000000 --corpus-dir echidna-corpora/corpus-value
// Ran from tests/test_data/ directory: test-generator ./src/ValueTransfer.sol --corpus-dir echidna-corpora/corpus-value --contract "ValueTransfer" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
// Ran from tests/test_data/ directory: fuzz-utils ./src/ValueTransfer.sol --corpus-dir echidna-corpora/corpus-value --contract "ValueTransfer" --test-directory "./test/" --inheritance-path "../src/" --fuzzer echidna
contract ValueTransfer {

function check_balance() public {
Expand Down
Loading