From 588b668b1a290a7b3bb41b41ad2c4011cab48e98 Mon Sep 17 00:00:00 2001 From: E M <5089238+emizzle@users.noreply.github.com> Date: Thu, 12 Feb 2026 22:14:21 +1100 Subject: [PATCH] Move to tests/cbindings --- .gitignore | 4 ++-- Makefile | 2 +- README.md | 18 +----------------- .../c => tests/cbindings}/hello_world.txt | 0 {examples/c => tests/cbindings}/storage.c | 0 5 files changed, 4 insertions(+), 20 deletions(-) rename {examples/c => tests/cbindings}/hello_world.txt (100%) rename {examples/c => tests/cbindings}/storage.c (100%) diff --git a/.gitignore b/.gitignore index c4aa0d4d..78030176 100644 --- a/.gitignore +++ b/.gitignore @@ -48,5 +48,5 @@ tests/integration/logs data/ -examples/c/data-dir -examples/c/downloaded_hello.txt +tests/cbindings/data-dir +tests/cbindings/downloaded_hello.txt diff --git a/Makefile b/Makefile index a5cff65e..c60c5eb6 100644 --- a/Makefile +++ b/Makefile @@ -150,7 +150,7 @@ testIntegration: | build deps # Builds a C example that uses the libstorage C library and runs it testLibstorage: | build deps $(MAKE) $(if $(ncpu),-j$(ncpu),) libstorage - cd examples/c && \ + cd tests/cbindings && \ if [ "$(detected_OS)" = "Windows" ]; then \ gcc -o storage.exe storage.c -L../../build -lstorage -pthread && \ PATH=../../build:$$PATH ./storage.exe; \ diff --git a/README.md b/README.md index 346ddfdf..9575e2eb 100644 --- a/README.md +++ b/README.md @@ -67,23 +67,7 @@ This produces the shared library under `build/`. ### Run the Go example -Build the Go example: - -```bash -go build -o storage-go examples/golang/storage.go -``` - -Export the library path: - -```bash -export LD_LIBRARY_PATH=build -``` - -Run the example: - -```bash -./storage-go -``` +See https://github.com/logos-storage/logos-storage-go-bindings-example. ### Static vs Dynamic build diff --git a/examples/c/hello_world.txt b/tests/cbindings/hello_world.txt similarity index 100% rename from examples/c/hello_world.txt rename to tests/cbindings/hello_world.txt diff --git a/examples/c/storage.c b/tests/cbindings/storage.c similarity index 100% rename from examples/c/storage.c rename to tests/cbindings/storage.c