[TEST] Fix find command for checking library
authorsewon.oh <sewon.oh@samsung.com>
Thu, 26 Jul 2018 10:05:49 +0000 (19:05 +0900)
committer함명주/동작제어Lab(SR)/Principal Engineer/삼성전자 <myungjoo.ham@samsung.com>
Fri, 27 Jul 2018 01:28:43 +0000 (10:28 +0900)
```bash
$ find "$dirpath/../build/gst/tensor_converter" "$dirpath/../build/gst/tensor_filter" "$dirpath/../build/gst/tensor_decoder" -name *.so 1>/dev/null 2>/dev/null
```
If the folder path is correct, above command always return 0.
So I change command to return 1 when there is *.so.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
tests/testAPI.sh

index 8190d71..73030a0 100644 (file)
@@ -2,13 +2,13 @@
 
 if [[ $# -eq 0 ]]; then
        dirpath="$( cd "$( dirname "$0")" && pwd )"
-       find "$dirpath/../build/gst/tensor_converter" "$dirpath/../build/gst/tensor_filter" "$dirpath/../build/gst/tensor_decoder" -name *.so 1>/dev/null 2>/dev/null
+       find "$dirpath/../build/gst" -name *.so | grep -q "." 
        if [ "$?" -ne "0" ]; then
                dirpath="$dirpath/../"
-               find "$dirpath/../build/gst/tensor_converter" "$dirpath/../build/gst/tensor_filter" "$dirpath/../build/gst/tensor_decoder" -name *.so 1>/dev/null 2>/dev/null
+               find "$dirpath/../build/gst" -name *.so | grep -q "." 
                if [ "$?" -ne "0" ]; then
                        dirpath="$dirpath/../"
-                       find "$dirpath/../build/gst/tensor_converter" "$dirpath/../build/gst/tensor_filter" "$dirpath/../build/gst/tensor_decoder" -name *.so 1>/dev/null 2>/dev/null
+                       find "$dirpath/../build/gst" -name *.so | grep -q "." 
                        if [ "$?" -ne "0" ]; then
                                echo "[ERROR] Cannot find nnstreamer plugin binaries. Before unit testing, you should build with cmake first."
                                exit 1