X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fscripts%2Fartiproxy-upload.sh;h=2d4302b7524eb885bb66e9e266b92adcbd8ed59e;hb=ecc62413b8ee33ecf886b2f4161b486c47db38de;hp=0e841d8fb858ba226b9807d45be62ec6f84e2c6d;hpb=af58e6d6d4d1fdb4359c878df30c4184c72c76ef;p=src%2Fqa-testdefinitions.git diff --git a/common/scripts/artiproxy-upload.sh b/common/scripts/artiproxy-upload.sh index 0e841d8..2d4302b 100755 --- a/common/scripts/artiproxy-upload.sh +++ b/common/scripts/artiproxy-upload.sh @@ -28,6 +28,23 @@ if [ -z "$2" ];then exit 1 fi +if [ -d "$1" ];then + echo "ERROR: $1 is a directory" + exit 1 +fi + +echo "DEBUG: filename=$2 data=$1" +if [ -e "$1" ];then + ls -l "$1" + if [ -s "$1" ];then + echo "DEBUG: $1 exists and not empty" + else + echo "WARNING: $1 is empty" + fi +else + echo "ERROR: data does not exists" +fi + curl --silent --show-error -F "filename=$2" -F "data=@$1" http://$PYARTIPROXY_IP:9090/cgi-bin/pyartiproxy.py --output curl.out if [ $? -ne 0 ];then echo "ERROR: with curl"