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

Move geth-diff -> eth-rpc #77

Merged
merged 1 commit into from
Feb 21, 2025
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ var is set automatically depending on the chain.

As for `TEST`, you can specify either `--matter-labs` to run the `matter-labs`
tests, `--open-zeppelin` to run the openzeppelin standard tests (currently disabled)
or `--geth-diff` to run the geth differential tests. Not specifying the test will
or `--eth-rpc` to run the eth-rpc tests. Not specifying the test will
result in all suites being executed consecutively.

When running the Kitchensink node, you must specify the `NODE_PATH`, `ADAPTER_PATH` and
Expand Down
3 changes: 3 additions & 0 deletions geth-diff/.gitignore → eth-rpc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Logs
logs
*.log
abi/*
pvm/*
evm/*
npm-debug.log*
yarn-debug.log*
yarn-error.log*
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default defineWorkspace([
extends: './vitest.config.ts',
test: {
name: 'unit',
include: ['./src/geth-diff.test.ts'],
include: ['./src/*.test.ts'],
},
},
])
30 changes: 15 additions & 15 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ run_matter_labs_tests() {
# parse_hardhat_test_results "../test-logs/open-zeppelin-tests.log"
# }

run_geth_diff_tests() {
echo "Running Geth Differential Tests" &&
cd ./geth-diff &&
run_eth_rpc_tests() {
echo "Running eth-rpc tests" &&
cd ./eth-rpc &&
npm install &&
echo "y" | npm run build &&
START_GETH=true START_SUBSTRATE_NODE=true START_ETH_RPC=true npm run test-init >".$LOG_DIR/geth-diff-tests.log" 2>&1
parse_geth_diff_test_results "../test-logs/geth-diff-tests.log"
START_GETH=true START_SUBSTRATE_NODE=true START_ETH_RPC=true npm run test-init >".$LOG_DIR/eth-rpc-tests.log" 2>&1
parse_eth_rpc_test_results "../test-logs/eth-rpc-tests.log"
}

run_all_tests() {
Expand Down Expand Up @@ -125,12 +125,12 @@ run_all_tests() {

# cd ..

echo "Running Geth Differential Tests" &&
cd ./geth-diff &&
echo "Running eth-rpc tests" &&
cd ./eth-rpc &&
npm install &&
echo "y" | npm run build &&
START_GETH=true START_SUBSTRATE_NODE=true START_ETH_RPC=true npm run test-init >".$LOG_DIR/geth-diff-tests.log" 2>&1
parse_geth_diff_test_results "../test-logs/geth-diff-tests.log"
START_GETH=true START_SUBSTRATE_NODE=true START_ETH_RPC=true npm run test-init >".$LOG_DIR/eth-rpc-tests.log" 2>&1
parse_eth_rpc_test_results "../test-logs/eth-rpc-tests.log"

echo "Test Run Complete"
}
Expand All @@ -153,7 +153,7 @@ parse_hardhat_test_results() {
echo "Total: $total | Passed: $passed | Failed: $failed"
}

parse_geth_diff_test_results() {
parse_eth_rpc_test_results() {
log_file=$1
passed=$(grep -o 'Tests [0-9]\+ passed' "$log_file" | awk '{print $2}')
failed=$(grep -o 'Tests [0-9]\+ failed' "$log_file" | awk '{print $2}')
Expand Down Expand Up @@ -274,7 +274,7 @@ case "$chain" in
--ethereum)
echo "Cleaning up"
rm -rf ./output-logs/geth-output.log
if [ "${tests}" = "--geth-diff" ]; then
if [ "${tests}" = "--eth-rpc" ]; then
echo "Starting Geth Ethereum Node"
else
echo "Starting Geth Ethereum Node"
Expand Down Expand Up @@ -357,8 +357,8 @@ case "$chain" in
# kill -9 $(lsof -t -i:30304)
# echo "Geth Ethereum Node Stopped"
# ;;
--geth-diff)
run_geth_diff_tests
--eth-rpc)
run_eth_rpc_tests
sleep 1
;;
*)
Expand Down Expand Up @@ -430,8 +430,8 @@ case "$chain" in
# --open-zeppelin)
# run_open_zeppelin_tests
# ;;
--geth-diff)
run_geth_diff_tests
--eth-rpc)
run_eth_rpc_tests
sleep 1
;;
*)
Expand Down