@@ -17,7 +17,7 @@ ubuntu_packages="
1717 openbox\
1818 xvfb"
1919
20- case " $RUNNER_OS " in
20+ case " ${ RUNNER_OS-} " in
2121 Linux)
2222 sudo apt update
2323 sudo apt -y install $ubuntu_packages
@@ -53,10 +53,29 @@ case "$RUNNER_OS" in
5353hd-rum-transcode
5454esac
5555
56- curl -LOf https://github.com/CESNET/UltraGrid/releases/download/continuous/\
56+ if [ " ${RUNNER_OS-} " ]; then
57+ curl -LOf https://github.com/CESNET/UltraGrid/releases/download/continuous/\
5758" $ug_build "
59+ prepare
60+ else # interactive use for debugging
61+ if [ " ${1-} " = help ] || [ " ${1-} " = " -h" ] || [ " ${1-} " = " --help" ]
62+ then
63+ echo " Usage (interactive only, non-CI)"
64+ printf " \t%s <path_to_uv> <path_to_hd_rum_transcode>\n" " $0 "
65+ exit 0
66+ fi
5867
59- prepare
68+ run_uv=${1?Please provide path to uv as first argument}
69+ run_reflector=${2?Please provide path to hd-rum-trancode as second argument}
70+ sys=$( uname -s)
71+ if [ " $sys " = Linux ]; then
72+ RUNNER_OS=Linux
73+ elif [ " $sys " = Darwin ]; then
74+ RUNNER_OS=macOS
75+ else
76+ RUNNER_OS=Windows
77+ fi
78+ fi
6079
6180# # used by run_test_data.sh
6281# # @param $1 args
@@ -90,6 +109,7 @@ while [ $i -lt $test_count ]; do
90109
91110 exec=$run_uv
92111 tool=uv
112+ # shellcheck disable=SC2154 # set by eval
93113 if expr -- " $opts " : ' .*run_reflector' > /dev/null; then
94114 tool=reflector
95115 exec=$run_reflector
@@ -102,7 +122,9 @@ while [ $i -lt $test_count ]; do
102122 fi
103123
104124 timeout=10
125+ # shellcheck disable=SC2154 # set by eval
105126 echo " Starting: \" timeout $timeout $exec $args \" "
127+ # shellcheck disable=SC2086 # intentional - split words
106128 timeout -k $(( timeout+ 5 )) $timeout $exec $args
107129 rc=$?
108130 echo " Finished: \" timeout $timeout $exec $args \" with RC $rc "
@@ -129,3 +151,4 @@ while [ $i -lt $test_count ]; do
129151 fi
130152done
131153
154+ printf " \n\n%s: all tests succeeded!\n\n" " $0 "
0 commit comments