From 4589fe23f7f11ec2906bf9392d4c8f776a408387 Mon Sep 17 00:00:00 2001 From: Marcin Czenko Date: Fri, 31 Oct 2025 04:29:34 +0100 Subject: [PATCH] adds note about env vars required for libcodex --- 10 Notes/testing codex-status-go integration.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/10 Notes/testing codex-status-go integration.md b/10 Notes/testing codex-status-go integration.md index 2dd0c9c..09dcf9c 100644 --- a/10 Notes/testing codex-status-go integration.md +++ b/10 Notes/testing codex-status-go integration.md @@ -161,6 +161,16 @@ go generate ./protobuf > If you run `make`, e.g. `make statusgo-library`, the correct `generate` commands for the protobuf will be run for you. So in practice, you may not need to run `go generate ./protobuf` manually yourself - but for reference, why not... let's break something ;). +### Environment variables to run unit tests + +After Codex library (`libcodex`) has been added to the project the build system depends on it. Thus, to run the tests directly using `go test` or `gotestsum` command you need to make sure that the following environment variables are set: + +```bash +export LIBS_DIR="$(realpath ./libs)" +export CGO_CFLAGS=-I$LIBS_DIR +export CGO_LDFLAGS="-L$LIBS_DIR -lcodex -Wl,-rpath,$LIBS_DIR" +``` + ### Running unit tests for Codex abstractions We have some unit tests and a couple of integration tests.