File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -134,15 +134,33 @@ kill_proc() {
134134 echo " === Done kill $name "
135135}
136136
137+ # Find path in old and new location.
138+ # Databend release once changed binary path from `./` to `./bin`.
139+ find_binary_path ()
140+ {
141+ local base=" $1 "
142+ local binary_name=" $2 "
143+
144+ if [ -f " $base /$binary_name " ]; then
145+ echo " $base /$binary_name "
146+ elif [ -f " $base /bin/$binary_name " ]; then
147+ echo " $base /bin/$binary_name "
148+ else
149+ echo " === Can not find binary path for $binary_name in $base / or $base /bin" >&2
150+ exit 1
151+ fi
152+
153+ }
154+
137155# Test specified version of query and meta
138156run_test () {
139157 local query_ver=" $1 "
140158 local metasrv_ver=" $2 "
141159
142160 echo " === Test with query-$query_ver and metasrv-$metasrv_ver "
143161
144- local query=" ./bins/$query_ver / databend-query"
145- local metasrv=" ./bins/$metasrv_ver / databend-meta"
162+ local query=" $( find_binary_path " ./bins/$query_ver " " databend-query" ) "
163+ local metasrv=" $( find_binary_path " ./bins/$metasrv_ver " " databend-meta" ) "
146164
147165 # "$metasrv" --single --cmd ver
148166
You can’t perform that action at this time.
0 commit comments