Skip to content

Commit 09ed3e9

Browse files
committed
Merge remote-tracking branch 'origin/unstable' into make-prog-suffix
# Conflicts: # tests/support/set_executable_path.tcl
2 parents eda96dd + 3fd0942 commit 09ed3e9

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

tests/support/set_executable_path.tcl

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# Set the directory to find Valkey binaries for tests. Historically we've been
22
# using make to build binaries under the src/ directory. Since we start supporting
3-
# CMake as well, we allow changing base dir by passing ENV variable `VALKEY_BIN_DIR`.
4-
# This must be an absolute path.
5-
set ::VALKEY_BIN_DIR [expr {[info exists ::env(VALKEY_BIN_DIR)] ? $::env(VALKEY_BIN_DIR) : "[pwd]/src"}]
6-
7-
# Optional program suffix (e.g. `make PROG_SUFFIX=-alt` will create binary valkey-server-alt).
8-
# Passed from `make test` as environment variable VALKEY_PROG_SUFFIX.
9-
set ::VALKEY_PROG_SUFFIX [expr {
10-
[info exists ::env(VALKEY_PROG_SUFFIX)] ? $::env(VALKEY_PROG_SUFFIX) : ""
11-
}]
3+
# CMake as well, we allow changing base dir by passing ENV variable `VALKEY_BIN_DIR`,
4+
# which could be either absolute or relative path (e.g. cmake-build-debug/bin).
5+
if {[info exists ::env(VALKEY_BIN_DIR)]} {
6+
set ::VALKEY_BIN_DIR [file normalize $::env(VALKEY_BIN_DIR)]
7+
} else {
8+
set ::VALKEY_BIN_DIR "[pwd]/src"
9+
}
1210

1311
# Optional program suffix (e.g. `make PROG_SUFFIX=-alt` will create binary valkey-server-alt).
1412
# Passed from `make test` as environment variable VALKEY_PROG_SUFFIX.

0 commit comments

Comments
 (0)