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 # execute
15 agl-test
16
17
18 if [ -x ./artiproxy-upload.sh ] ; then
19     LOG_DIR='/var/run/agl-test/logs/log-to-report'
20     ZIP_FILE=`ls ${LOG_DIR} | grep agl-test-log*`
21
22     ls -alh ${LOG_DIR}
23
24     if [ -z $ZIP_FILE ] ; then
25         echo "Cannot find agl-extend-test log"
26         exit 1
27     fi
28
29     echo "DEBUG: upload LOG_DIR=${LOG_DIR}XXX"
30     echo "DEBUG: upload ZIP_FILE=${ZIP_FILE}XXX"
31
32     ./artiproxy-upload.sh "$LOG_DIR/$ZIP_FILE" "$ZIP_FILE"
33     if [ $? -eq 1 ] ; then
34         echo "Upload of ${ZIP_FILE} failed"
35         exit 1
36     else
37         echo "Upload of test report successful"
38         exit 0
39     fi
40
41 else
42     echo "The file artiproxy-upload.sh does not exist"
43     exit 126
44 fi