fd3a4f837fa700811a83f097dc819e8cabb3e6bc
[src/qa-testdefinitions.git] / common / scripts / agl-extend-test.sh
1 #!/bin/bash
2
3 pre_check=`which agl-test`
4
5 if [ -n "$pre_check" ] ; then
6     agl-test
7     echo "agl-extend-test is present"
8 else
9     echo "agl-test is not installed, abort this test"
10     exit 127
11 fi
12
13
14 if [ -x ./artiproxy-upload.sh ] ; then
15     LOG_DIR=/var/run/agl-test/logs/log-to-report
16     ZIP_FILE=`ls ${LOG_DIR} | grep agl-test-log*`
17
18     if [ -z $ZIP_FILE ] ; then
19         echo "Cannot find agl-extend-test log"
20         exit 1
21     fi
22
23     ./artiproxy-upload.sh $LOG_DIR $ZIP_FILE
24     if [ $? -eq 1 ] ; then
25         echo "Upload of ${ZIP_FILE} failed"
26         exit 1
27     else
28         echo "Upload of test report successful"
29         exit 0
30     fi
31
32 else
33     echo "The file artiproxy-upload.sh does not exist"
34     exit 126
35 fi