Repository: Xilinx/inference-server (language: python)

Issue:
Add check for missing test assets before running tests
**Describe the bug**
Some test artifacts are on git LFS and may not be downloaded automatically. The files exist on disk but are not valid image/video files. While running tests, the test will fail as the image cannot be decoded.

**To Reproduce**
Steps to reproduce the behavior:
```
# clone repository and explicitly skip LFS files
$ GIT_LFS_SKIP_SMUDGE=1 git clone <repo>

# then build the container and run tests
-> tests fail
```

**Solution**
Add a check in the test script to verify that all test image/video files are valid before running the tests



Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 0dd30f0e6..6bd35771b 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -28,6 +28,13 @@ Added
 ^^^^^
 
 - Allow building Debian package (:commit:`930fab2`)
+- Add ``modelInferAsync`` to the API (:commit:`2f4a6c2`)
+
+Changed
+^^^^^^^
+
+- Use input tensors in requests correctly (:pr:`61`)
+
 
 :github:`0.2.0 <Xilinx/inference-server/releases/tag/v0.2.0>` - 2022-08-05
 --------------------------------------------------------------------------
diff --git a/proteus b/proteus
index f48eea567..7a15ab5a5 100755
--- a/proteus
+++ b/proteus
@@ -803,6 +803,11 @@ class Get:
             ],
         }
 
+        if run_command("git lfs version", args.dry_run) is None:
+            run_command("git lfs pull", args.dry_run)
+        else:
+            print("Git LFS not found, not automatically getting LFS artifacts")
+
         for location, urls in files.items():
             for url in urls:
                 if "www.xilinx.com/bin/public/openDownload" in url:


Test patch:
diff --git a/tests/test.sh b/tests/test.sh
index 369c89f49..17a01e5d2 100755
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -80,6 +80,20 @@ if [[ -z $LD_LIBRARY_PATH && -f ~/.env ]]; then
   source ~/.env
 fi
 
+# make sure Git LFS artifacts are downloaded
+jpgs=($(find $root_path/tests/assets/ -name "*.jpg"))
+for jpg in ${jpgs[@]}; do
+  if file $jpg | grep "ASCII" &> /dev/null; then
+    if git lfs version &> /dev/null; then
+      git lfs pull
+    else
+      "Git LFS artifacts are not present and git lfs is not installed"
+      exit 1
+    fi
+  fi
+done
+
+
 # if the python package doesn't exist, do a build first for the BUILD variable
 if ! pip list | grep proteus &> /dev/null; then
   cd $root_path