From 8bc8387fd4ae26a0210f0c90cf5564408cbda519 Mon Sep 17 00:00:00 2001 From: "sewon.oh" Date: Thu, 26 Jul 2018 19:05:49 +0900 Subject: [PATCH] [TEST] Fix find command for checking library ```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 --- tests/testAPI.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testAPI.sh b/tests/testAPI.sh index 8190d71..73030a0 100644 --- a/tests/testAPI.sh +++ b/tests/testAPI.sh @@ -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 -- 2.7.4