Merge "Change dir to the script location"
[releng.git] / jjb / kvmfornfv / kvmfornfv-test.sh
1 #!/bin/bash
2 ##########################################################
3 ##This script includes executing cyclictest scripts.
4 ##########################################################
5 #The latest build packages are stored in build_output
6
7 ls -al $WORKSPACE/build_output
8
9 if [[ "$JOB_NAME" =~ (verify|merge|daily|weekly) ]]; then
10     JOB_TYPE=${BASH_REMATCH[0]}
11 else
12     echo "Unable to determine job type!"
13     exit 1
14 fi
15
16 echo $TEST_NAME
17
18 # do stuff differently based on the job type
19 case "$JOB_TYPE" in
20     verify)
21         #start the test
22         cd $WORKSPACE
23         ./ci/test_kvmfornfv.sh $JOB_TYPE
24         ;;
25     daily)
26         #start the test
27         cd $WORKSPACE
28         ./ci/test_kvmfornfv.sh $JOB_TYPE $TEST_NAME
29         ;;
30     *)
31         echo "Test is not enabled for $JOB_TYPE jobs"
32         exit 1
33 esac