summaryrefslogtreecommitdiff
path: root/triggers/testing_trigger.sh
blob: ab229262d37e32524faca69126d0077ecb1f895b (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
set -ex
ARTEFACT=$1
TESTING_SHA=$2
echo "[$(date "+%F %R")] Testing triggered. Artefact: $1" >> ../../../../trigger_log
sudo chown $USER /archive/tlsa-ciat-test-x86_64.raw
chmod 644 /archive/tlsa-ciat-test-x86_64.raw
### First you need to source the environment for openstack deployment.
### This isn't commited because it contains password, etc.

set +x
source /archive/tlsa/os.setup
set -x

### 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 ssh://git@cu010-trove.codethink.com/cu010-trove/br6/ciat-tester
cd ciat-tester
if [ "$TESTING_SHA" != "no_testing_sha_given" ]; then
    git checkout $TESTING_SHA
fi
PATH=$PATH:/usr/local/bin
./test-runner.sh file:///archive/"$ARTEFACT".raw openstack tests/python.test tests/uname.test tests/systemd.test tests/baserock-meta.test