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

WIP: Update dockerisation #3477

Merged
merged 40 commits into from
Jan 4, 2024
Merged

Conversation

parithosh
Copy link
Member

@parithosh parithosh commented Aug 10, 2023

This PR adds a script to run the tests inside a Docker container. Ideally we can move to using a containerized environment for all the tests in the future, but the script is a good first step at gathering user feedback.

The PR adds a standalone Dockerfile, this file just sets up the dependencies required to run the tool and can be used independently. The docker image can be locally built with:

  • docker build ./ -t $IMAGE_NAME -f ./docker/Dockerfile will build the docker container
  • docker run -it $IMAGE_NAME /bin/sh will give you a shell inside the docker container to manually run any tests
  • docker run $IMAGE_NAME make citest will run the make citest command inside the docker container
  • Ideally manual running of docker containers is for advanced users, we recommend the script for most users

There is additionally a scripts/build_run_docker_tests.sh script which covers most regular usecases. The script allows the user to configure the fork(altair/bellatrix/capella..), image_name(specifies the container to use), number of cores, preset type(mainnet/minimal) and test all forks flags. Ideally this is the main way that users interact with the spec tests, instead of running it locally.

E.g:

  • ./build_run_test.sh --p mainnet --n 16 will run the mainnet preset tests with 16 threads
  • ./build_run_test.sh --a will run all the tests across all the forks
  • ./build_run_test.sh --f deneb --n 16 will only run deneb tests on 16 threads

Results are always placed in a folder called ./testResults. The results are .xml files and contain the fork they represent and the date/time they were run at.

wenceslas-sanchez and others added 30 commits August 7, 2023 21:14
Co-authored-by: Hsiao-Wei Wang <[email protected]>
@wenceslas-sanchez wenceslas-sanchez mentioned this pull request Oct 25, 2023
4 tasks
@mrthankyou
Copy link

@parithosh,

Do you need any additional help on this PR? This is semi-blocking for me as I would like to write some tests for consensus-spec and this would make my work much easier :).

@parithosh
Copy link
Member Author

Sorry I haven't had much time to look into the topic since the initial commits. I'll try and assign some time next week to close up the topic.

@mrthankyou
Copy link

Happy to help and save you time any way I can. Just let me know!

@parithosh
Copy link
Member Author

cc @hwwhww @dapplion @mrthankyou

Sorry for the delay on this PR, let me know what you think and how it works for you.

Copy link
Contributor

@hwwhww hwwhww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parithosh Tested locally and LGTM! 👏

p.s. It's probably better to squash merge it

@parithosh parithosh merged commit e525946 into ethereum:dev Jan 4, 2024
29 checks passed
@parithosh parithosh deleted the update-dockerisation branch January 4, 2024 16:09
@parithosh
Copy link
Member Author

would it make sense to add a small usage/installation guide in the main README as well?

@hwwhww
Copy link
Contributor

hwwhww commented Jan 4, 2024

@parithosh

Maybe add tutorial in a docker/README.md file and add a link in the main home README.md?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants