X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=ssat-api.sh;h=8d1a93a21f05d71615fbdefa32e78778c7b484bc;hb=0f598bb0fd9108a7752a1175f8b03ee15b45d376;hp=cae64bec6dfab8c2c458e898f1b9fb23d950889c;hpb=5cb608e4fcbe79c708622bf689f9d677c9328090;p=platform%2Fupstream%2FSSAT.git diff --git a/ssat-api.sh b/ssat-api.sh index cae64be..8d1a93a 100644 --- a/ssat-api.sh +++ b/ssat-api.sh @@ -312,7 +312,20 @@ function gstTest() { calloutputprefix='valgrind --track-origins=yes' fi + TIMEOUT_AVAIL=1 if [[ "${6}" -gt "0" ]]; then + if ! command -v timeout &> /dev/null + then + if command -v perl &> /dev/null + then + timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; } + else + TIMEOUT_AVAIL=0 + fi + fi + fi + + if [[ "${6}" -gt "0" && $TIMEOUT_AVAIL -eq 1 ]]; then if [[ "${SILENT}" -eq "1" ]]; then calloutput=$(eval timeout ${6} $calloutputprefix gst-launch-1.0 -f -q $1 &> /dev/null) else