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() {
134
134
echo " === Done kill $name "
135
135
}
136
136
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
+
137
155
# Test specified version of query and meta
138
156
run_test () {
139
157
local query_ver=" $1 "
140
158
local metasrv_ver=" $2 "
141
159
142
160
echo " === Test with query-$query_ver and metasrv-$metasrv_ver "
143
161
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" ) "
146
164
147
165
# "$metasrv" --single --cmd ver
148
166
You can’t perform that action at this time.
0 commit comments