-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from unix-thrust/jenkins-script
chore(jenkins): add a script to run jenkins tests
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |