MLECO-1253 Adding ASR sample application using the PyArmNN api

Change-Id: I450b23800ca316a5bfd4608c8559cf4f11271c21
Signed-off-by: Éanna Ó Catháin <eanna.ocathain@arm.com>
diff --git a/python/pyarmnn/examples/common/tests/conftest.py b/python/pyarmnn/examples/common/tests/conftest.py
new file mode 100644
index 0000000..5e027a0
--- /dev/null
+++ b/python/pyarmnn/examples/common/tests/conftest.py
@@ -0,0 +1,40 @@
+# Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+# SPDX-License-Identifier: MIT
+
+import os
+import ntpath
+
+import urllib.request
+import zipfile
+
+import pytest
+
+script_dir = os.path.dirname(__file__)
+@pytest.fixture(scope="session")
+def test_data_folder(request):
+    """
+        This fixture returns path to folder with shared test resources among all tests
+    """
+
+    data_dir = os.path.join(script_dir, "testdata")
+    if not os.path.exists(data_dir):
+        os.mkdir(data_dir)
+
+    files_to_download = ["https://raw.githubusercontent.com/opencv/opencv/4.0.0/samples/data/messi5.jpg",
+                         "https://raw.githubusercontent.com/opencv/opencv/4.0.0/samples/data/basketball1.png",
+                         "https://raw.githubusercontent.com/opencv/opencv/4.0.0/samples/data/Megamind.avi",
+                         "https://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip"
+                         ]
+
+    for file in files_to_download:
+        path, filename = ntpath.split(file)
+        file_path = os.path.join(data_dir, filename)
+        if not os.path.exists(file_path):
+            print("\nDownloading test file: " + file_path + "\n")
+            urllib.request.urlretrieve(file, file_path)
+
+    # Any unzipping needed, and moving around of files
+    with zipfile.ZipFile(os.path.join(data_dir, "coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip"), 'r') as zip_ref:
+        zip_ref.extractall(data_dir)
+
+    return data_dir