diff --git a/Makefile b/Makefile index 095aa26..5a812c5 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ profile ?=default build: @./build.sh -p production -test: +tests: @./test.sh -p $(profile) fuzz: @@ -41,4 +41,3 @@ sizes: clean: forge clean && rm -rf ./abi && rm -rf ./bytecode && rm -rf ./types - diff --git a/package.json b/package.json index a0dcbd6..1b17956 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test.sh b/test.sh index 6f46a06..35dbe94 100755 --- a/test.sh +++ b/test.sh @@ -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