diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2023-05-24 14:35:21 +0000 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2023-05-31 07:54:57 +0000 |
commit | ecc62413b8ee33ecf886b2f4161b486c47db38de (patch) | |
tree | 3cbb15401aa4a23c56a8f0529e66b6bc43323c61 /common/scripts/artiproxy-upload.sh | |
parent | af58e6d6d4d1fdb4359c878df30c4184c72c76ef (diff) |
SPEC-4816: Fix upload in agl-extend-test.sh
agl-extend-test.sh fail to upload a zip file, since it give the
directory instead of the file to upload.
While fixing this, add some extra test and debug around upload of files.
Bug-AGL: SPEC-4816
Fixes: 2e5067e302bc ("qa-testdefinitions: add yaml and script for agl extend test")
Change-Id: Ieeefa239398a82b2156391dfe8f58f654a6a29b3
Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
Diffstat (limited to 'common/scripts/artiproxy-upload.sh')
-rwxr-xr-x | common/scripts/artiproxy-upload.sh | 17 |
1 files changed, 17 insertions, 0 deletions
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" |