This PR is to append a dependency check routine to inspect the required
packages are install before starting tests/testAPI.sh
**Changes proposed in this PR:**
1. Added dependency check function
2. Applied shell commands with checkDependency()
- gst-launch-1.0, cmp, dirname, basename, sed, and find
**Self assessment:**
1. gbs build: okay
2. local test: okay
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
log=""
##
+# @brief check if a command is installed
+# @param 1 the command name
+function checkDependency {
+ echo "Checking for $1..."
+ which "$1" 2>/dev/null || {
+ echo "Ooops. '$1' command is not installed. Please install '$1'."
+ exit 1
+ }
+}
+
+checkDependency gst-launch-1.0
+checkDependency cmp
+
+##
# @brief execute gst-launch based test case
# @param 1 the whole parameters
# @param 2 the case number
exit 1
fi
}
+
source $dirpath/testAPI.sh
+checkDependency dirname
+checkDependency basename
+checkDependency sed
+checkDependency find
+
sopath=""
log=""
summary=""