Skip to content

Commit

Permalink
Merge branch 'vagrant-no_tests'
Browse files Browse the repository at this point in the history
  • Loading branch information
Randy Barlow committed Jul 9, 2015
2 parents 86b154a + 93f38a9 commit 0a69e9b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 11 deletions.
4 changes: 2 additions & 2 deletions playpen/vagrant-motd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Here are some tips:
Similarly, run "workon pulp" to jump into the pulp platform virtualenv.
* Each project has a "run-tests.py" to run the unit tests.
* There are a set of bash functions in your .bashrc that are useful: pstart,
pstop, prestart, pstatus. They will start, stop, restart, and tell you the
status of all of the Pulp services.
pstop, prestart, pstatus, and ptests. They will start, stop, restart, tell you
the status of all of the Pulp services, and run all unit tests.
* You can ssh into your vagrant environment with vagrant ssh, but presumably
you already know this since you are reading this message :)

Expand Down
49 changes: 40 additions & 9 deletions playpen/vagrant-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,48 @@

# Let's add p{start,stop,restart,status} to the .bashrc
if ! grep pstart ~/.bashrc; then
echo -e "\n\npstart() {\n _paction start\n}\n" >> ~/.bashrc
echo -e "pstop() {\n _paction stop\n}\n" >> ~/.bashrc
echo -e "prestart() {\n _paction restart\n}\n" >> ~/.bashrc
echo -e "pstatus() {\n _paction status\n}\n" >> ~/.bashrc
echo -e "_paction() {\n" >> ~/.bashrc
echo -e " for s in goferd httpd pulp_workers pulp_celerybeat pulp_resource_manager; do" >> ~/.bashrc
echo -e " sudo systemctl \$1 \$s;\n done;\n}" >> ~/.bashrc
cat << EOF >> ~/.bashrc
pstart() {
_paction start
}
pstop() {
_paction stop
}
prestart() {
_paction restart
}
pstatus() {
_paction status
}
ptests() {
pushd /home/vagrant/devel;
for r in {pulp,pulp_deb,pulp_docker,pulp_openstack,pulp_ostree,pulp_puppet,pulp_python,pulp_rpm}; do
if [ -d \$r ]; then
pushd \$r;
workon \$r;
./run-tests.py -x --enable-coverage;
deactivate;
popd;
fi
done;
popd;
}
_paction() {
for s in goferd httpd pulp_workers pulp_celerybeat pulp_resource_manager; do
sudo systemctl \$1 \$s;
done;
}
EOF
fi
if ! grep DJANGO_SETTINGS_MODULE ~/.bashrc; then
echo "export DJANGO_SETTINGS_MODULE=pulp.server.webservices.settings" >> ~/.bashrc
echo -e "\nexport DJANGO_SETTINGS_MODULE=pulp.server.webservices.settings" >> ~/.bashrc
fi
# We always need to source those variables from the bashrc, in case the user is running this for the
# first time, or invoking the script directly with bash.
Expand Down Expand Up @@ -44,7 +76,6 @@ for r in {pulp,pulp_deb,pulp_docker,pulp_openstack,pulp_ostree,pulp_puppet,pulp_
# Install dependencies for automated tests
pip install -r test_requirements.txt
sudo python ./pulp-dev.py -I
./run-tests.py -x --enable-coverage
deactivate
popd
fi
Expand Down

0 comments on commit 0a69e9b

Please sign in to comment.