Skip to content

Commit

Permalink
Merge pull request #74 from unix-thrust/jenkins-script
Browse files Browse the repository at this point in the history
chore(jenkins): add a script to run jenkins tests
  • Loading branch information
nil0x42 committed Sep 28, 2015
2 parents 601a11c + 275e499 commit b57c62e
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions utils/jenkins-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
set -o errexit
set -o pipefail

# This script is used by jenkins.

function help() {
echo "You need to define BEURK_VM_NAME and BEURK_VM_PORT environnements variables
before running this script."
exit 1
}

[ -z "$BEURK_VM_NAME" ] && help
[ -z "$BEURK_VM_PORT" ] && help

# Go to the root of the project
cd /home/vagrant/project/beurk

# Disinfect the VM
sudo kill `ps -ef | grep "python -m SimpleHTTPServer 3005" | grep -v "grep" | awk -F ' +' '{print $2}'`;
sudo make disinfect && sudo make distclean

# Run the integration tests
./utils/run-tests.sh tests/quick

# Infect the VM
make re && sudo make infect
nohup -- python -m SimpleHTTPServer 3005 &

# Run the functional tests
./utils/run-tests.sh tests/functional

# Yeah!!!!
exit 0

0 comments on commit b57c62e

Please sign in to comment.