Skip to content

Commit

Permalink
Merge pull request #2 from MZero-Labs/fix/make-tests
Browse files Browse the repository at this point in the history
fix: make tests
  • Loading branch information
deluca-mike authored Jun 14, 2024
2 parents ab5d1eb + 0884bec commit d079206
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ profile ?=default
build:
@./build.sh -p production

test:
tests:
@./test.sh -p $(profile)

fuzz:
Expand All @@ -41,4 +41,3 @@ sizes:

clean:
forge clean && rm -rf ./abi && rm -rf ./bytecode && rm -rf ./types

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"slither": "forge build --build-info --skip '*/test/**' --skip '*/script/**' --force && slither --compile-force-framework foundry --ignore-compile --config-file slither.config.json --fail-high .",
"solhint": "solhint -f stylish 'src/**/*.sol'",
"solhint-fix": "solhint --fix 'src/**/*.sol'",
"test": "make -B test",
"test": "make -B tests",
"test-gas": "make -B gas-report",
"test-fuzz": "make -B fuzz",
"test-integration": "make -B integration",
Expand Down
11 changes: 9 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,18 @@ else
verbosity="-vvvv"
fi

if [ "$gas" = false ];
then
gasReport=""
else
gasReport="--gas-report"
fi

if [ -z "$test" ]; then
if [ -z "$directory" ]; then
forge test --match-path "test/*" $gasReport
forge test --match-path "test/*" $gasReport $verbosity
else
forge test --match-path "$directory/*.t.sol" $gasReport
forge test --match-path "$directory/*.t.sol" $gasReport $verbosity
fi
else
forge test --match-test "$test" $gasReport $verbosity
Expand Down

0 comments on commit d079206

Please sign in to comment.