summaryrefslogtreecommitdiffstats
path: root/build-gluster-org/scripts/gd2-smoke.sh
blob: b69c1bb753bc37ce701ca87eaece985898fc7968 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

set -e

function cleanup() {
    killall glusterfs etcd make glusterd2
    sleep 5
    killall -9 glusterfs etcd make glusterd2
}

trap cleanup ERR

JDIRS="/var/log/glusterfs /var/lib/glusterd /var/run/gluster /build"
sudo rm -rf $JDIRS
sudo mkdir -p $JDIRS || true
echo Return code = $?
sudo chown -RH jenkins:jenkins $JDIRS
echo Return code = $?
sudo chmod -R 755 $JDIRS
echo Return code = $?

# build the glusterfs source code
/opt/qa/build.sh

# run gd2 tests script
/opt/qa/glusterd2-test.sh