Skip to content

Support reusing externally built valkey-server and valkeymodule.h for test#103

Open
enjoy-binbin wants to merge 3 commits into
valkey-io:unstablefrom
enjoy-binbin:update2
Open

Support reusing externally built valkey-server and valkeymodule.h for test#103
enjoy-binbin wants to merge 3 commits into
valkey-io:unstablefrom
enjoy-binbin:update2

Conversation

@enjoy-binbin
Copy link
Copy Markdown
Member

@enjoy-binbin enjoy-binbin commented Jun 3, 2026

Add VALKEY_SERVER_PATH and VALKEY_MODULE_H_PATH options to skip
building Valkey from source for integration tests:

  • VALKEY_SERVER_PATH: copy the provided valkey-server binary into
    the integration test directory instead of building it.
  • VALKEY_MODULE_H_PATH: copy the provided valkeymodule.h instead of
    fetching it from the cloned Valkey repo, so the header version can
    match the binary version.
  • When both are set (or VALKEY_MODULE_H_PATH alone for non-integration
    builds), the Valkey repo is no longer cloned at all, enabling fully
    offline builds.

Add VALKEY_SERVER_PATH to skip building Valkey from source and copy
the provided binary into the integration test directory instead.
The Valkey source is still downloaded (without being built) so that
valkeymodule.h is available for module compilation.

Signed-off-by: Binbin <binloveplay1314@qq.com>
@enjoy-binbin enjoy-binbin requested a review from roshkhatri June 3, 2026 13:11
Comment thread README.md
Comment on lines +52 to +56
To skip building Valkey from source and reuse an externally built `valkey-server` binary, set `VALKEY_SERVER_PATH` to its absolute path.
The binary will be copied into the integration test directory; `valkeymodule.h` is still fetched from the Valkey repo for compiling the module:
```text
SERVER_VERSION=unstable VALKEY_SERVER_PATH=/path/to/valkey-server ./build.sh --integration
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can also add a path to valkeymodule.h? so you can match the version of valkey you built and the valkeymodule.h version? with this we would also be able to build it offilne?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good call out, added valkeymodule.h

Allow supplying a local valkeymodule.h via VALKEY_MODULE_H_PATH so
header and valkey-server versions can be matched. When combined with
VALKEY_SERVER_PATH, the Valkey repo is no longer cloned at all,
enabling fully offline builds.

Signed-off-by: Binbin <binloveplay1314@qq.com>
@enjoy-binbin enjoy-binbin changed the title Support reusing an externally built valkey-server binary for test Support reusing externally built valkey-server and valkeymodule.h for test Jun 5, 2026
Signed-off-by: Binbin <binloveplay1314@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants