Skip to content

Commit 95ecc81

Browse files
committed
fix: linux musl e2e test vector extension path
1 parent b047b89 commit 95ecc81

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ jobs:
277277
--platform linux/arm64 \
278278
-v ${{ github.workspace }}:/workspace \
279279
-w /workspace \
280+
-e APIKEY=${{ secrets.APIKEY }} \
281+
-e GITHUB_TOKEN=${{ github.token }} \
280282
alpine:latest \
281283
tail -f /dev/null
282284
docker exec alpine sh -c "apk update && apk add --no-cache gcc g++ make cmake sqlite sqlite-dev musl-dev linux-headers git curl openssl-dev"

test/e2e.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,15 @@ TEST(memory_version) {
133133
}
134134

135135
TEST(load_vector) {
136+
// Strip file extension — load_extension() appends it automatically
137+
char path[512];
138+
snprintf(path, sizeof(path), "%s", vector_lib);
139+
char *dot = strrchr(path, '.');
140+
char *slash = strrchr(path, '/');
141+
if (dot && (!slash || dot > slash)) *dot = '\0';
142+
136143
char sql[512];
137-
snprintf(sql, sizeof(sql), "SELECT load_extension('%s');", vector_lib);
144+
snprintf(sql, sizeof(sql), "SELECT load_extension('%s');", path);
138145
ASSERT_SQL_OK(db, sql);
139146

140147
result_buf[0] = '\0';

0 commit comments

Comments
 (0)