Skip to content

Commit b57c62e

Browse files
committed
Merge pull request #74 from unix-thrust/jenkins-script
chore(jenkins): add a script to run jenkins tests
2 parents 601a11c + 275e499 commit b57c62e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

utils/jenkins-tests.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
set -o errexit
3+
set -o pipefail
4+
5+
# This script is used by jenkins.
6+
7+
function help() {
8+
echo "You need to define BEURK_VM_NAME and BEURK_VM_PORT environnements variables
9+
before running this script."
10+
exit 1
11+
}
12+
13+
[ -z "$BEURK_VM_NAME" ] && help
14+
[ -z "$BEURK_VM_PORT" ] && help
15+
16+
# Go to the root of the project
17+
cd /home/vagrant/project/beurk
18+
19+
# Disinfect the VM
20+
sudo kill `ps -ef | grep "python -m SimpleHTTPServer 3005" | grep -v "grep" | awk -F ' +' '{print $2}'`;
21+
sudo make disinfect && sudo make distclean
22+
23+
# Run the integration tests
24+
./utils/run-tests.sh tests/quick
25+
26+
# Infect the VM
27+
make re && sudo make infect
28+
nohup -- python -m SimpleHTTPServer 3005 &
29+
30+
# Run the functional tests
31+
./utils/run-tests.sh tests/functional
32+
33+
# Yeah!!!!
34+
exit 0

0 commit comments

Comments
 (0)