Skip to content

Instantly share code, notes, and snippets.

@mhuin
Last active February 8, 2023 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhuin/1177dc30971112404fd7c078651682ed to your computer and use it in GitHub Desktop.
Save mhuin/1177dc30971112404fd7c078651682ed to your computer and use it in GitHub Desktop.
Setting up an Ubuntu 22.04 VM to run Zuul unit tests - https://www.softwarefactory-project.io/
#!/bin/sh
# increase file descriptor limit. Might be overkill
# to set it to the limit
ulimit -n $(ulimit -Hn)
cd zuul
nox -s tests --install-only
echo "Test venv installed. You can update python dependencies with 'source .nox/tests/bin/activate' "
echo "then install your desired version."
echo
echo "Run tests with: 'nox -R -s tests'"
#!/bin/sh
sudo apt update
sudo apt -y upgrade
sudo apt -y install git git-review vim tmux python3-pip docker docker-compose
sudo pip install bindep nox
git clone --depth 1 https://opendev.org/zuul/zuul
cd zuul
sudo apt -y install $(bindep --brief test)
# uninstall mysql & postgres as they will run in a compose
sudo apt -y remove mysql-server postgresql
sudo apt -y install postgresql-client mysql-client
sudo apt -y autoremove
# Start external services
ROOTCMD=sudo tools/test-setup-docker.sh
echo "Now would be a great time to snapshot your VM!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment