test: script updated for better fault handling.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 3 May 2022 03:33:17 +0000 (12:33 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 10 Aug 2023 10:34:35 +0000 (19:34 +0900)
If the test is not available (e.g., numpy is not available or
the tested feature is not built), don't test.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
tests/nnstreamer_decoder_python3/runTest.sh
tests/nnstreamer_merge/runTest.sh
tests/nnstreamer_repo_lstm/runTest.sh
tests/transform_clamp/runTest.sh
tests/transform_stand/runTest.sh
tests/transform_transpose/runTest.sh

index 3783b57..00df0fa 100755 (executable)
@@ -51,7 +51,8 @@ if [[ -d $PATH_TO_PLUGIN ]]; then
         fi
     else
         echo "Cannot find ${ini_path}"
-        report exit
+        report
+        exit
     fi
 else
     echo "No build directory"
index 652fe91..ca9687c 100644 (file)
@@ -25,8 +25,8 @@ if [ "$SKIPGEN" == "YES" ]; then
     sopath=$2
 else
     echo "Test Case Generation Started"
-    python3 ../nnstreamer_converter/generateGoldenTestResult.py 9
-    python3 generateTest.py
+    python3 ../nnstreamer_converter/generateGoldenTestResult.py 9 || echo "Failed to run test preparation script (generateGoldenTestResult.py). Test not available." && report && exit
+    python3 generateTest.py || echo "Failed to run test preparation script (generateTest.py). Test not available." && report && exit
     sopath=$1
 fi
 convertBMP2PNG
index e7a1489..1caa1ee 100755 (executable)
@@ -48,7 +48,7 @@ if [ -z ${SO_EXT} ]; then
 fi
 
 # Generate video_4x4xBGRx.xraw & golden
-python3 generateTestCase.py
+python3 generateTestCase.py || echo "Failed to run test preparation script (generateTest.py). Test not available." && report && exit
 
 gstTest "--gst-plugin-path=../../build \
 tensor_mux name=mux sync-mode=nosync ! \
index f32a13d..c1148db 100755 (executable)
@@ -26,7 +26,7 @@ if [ "$SKIPGEN" == "YES" ]; then
     sopath=$2
 else
     echo "Test Case Generation Started"
-    python3 generateTest.py
+    python3 generateTest.py || echo "Failed to run test preparation script (generateTest.py). Test not available." && report && exit
     sopath=$1
 fi
 
index 9140326..0521938 100644 (file)
@@ -25,7 +25,7 @@ if [ "$SKIPGEN" == "YES" ]; then
     sopath=$2
 else
     echo "Test Case Generation Started"
-    python3 generateTest.py
+    python3 generateTest.py || echo "Failed to run test preparation script (generateTest.py). Test not available." && report && exit
     sopath=$1
 fi
 
index 8ee0af4..94f563f 100755 (executable)
@@ -25,7 +25,7 @@ if [ "$SKIPGEN" == "YES" ]; then
     sopath=$2
 else
     echo "Test Case Generation Started"
-    python3 generateTest.py
+    python3 generateTest.py || echo "Failed to run test preparation script (generateTest.py). Test not available." && report && exit
     sopath=$1
 fi