summaryrefslogtreecommitdiff
path: root/triggers/testing_trigger.sh
blob: c1d33b8ade45b92cf91e2baa395a93be09c3157b (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
27
28
29
30
31
32
33
34
35
36
37
38
39
set -ex
ARTEFACT=$1
TESTING_SHA=$2
BUILDSLAVE_SCRIPTS_SHA=$3
DEFINITIONS_SHA=$4
echo "[$(date "+%F %R")] Testing triggered. Artefact: $1" >> ../../../../trigger_log


### Now you can run the tester:

cd /archive
sudo mkdir -p testing
sudo chown -R $USER /archive/testing
cd /archive/testing
if [ -d ciat-tester ]; then
    sudo rm -rf ciat-tester
fi
git clone git://cu010-trove.codethink.com/cu010-trove/br6/ciat-tester.git
cd ciat-tester
if [ "$TESTING_SHA" != "no_testing_sha_given" ]; then
    git checkout $TESTING_SHA
fi
PATH=$PATH:/usr/local/bin

### Copy systems.setup with info of the systems to test,
### openstack.setup to get OpenStack host details
### and multiple.test with the tests to run
### (This shouldn't be hardcoded here)
cp /archive/pedroalvarez/system.setup system.setup
cp /archive/pedroalvarez/openstack.setup openstack.setup
cp /archive/pedroalvarez/multiple.test multiple.test


### Change the URL of system.setup to point to ARTEFACT
sed -i -e "s/IMAGE/$ARTEFACT.raw/g" system.setup

### Run the tester.
### (These files shouldn't be hardcoded)
python -u tester --setup system.setup multiple.test