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