Skip to content

Commit e159de6

Browse files
committed
test: conditionally wrap environment variable setup in test_regressions to support non-POSIX platforms
1 parent 82c28ac commit e159de6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/test_regressions.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
// - db_wal_last_sql is per-instance (no cross-instance leakage)
1313
//
1414
// Compile (macOS/Linux):
15-
// cc tests/test_regressions.c src/class.c src/deps/sqlite/sqlite3.c \
16-
// -Isrc -Isrc/deps/sqlite -lcurl -lpthread -o test_regressions
15+
// cc tests/test_regressions.c src/class.c src/deps/sqlite/sqlite3.c -Isrc -Isrc/deps/sqlite -lcurl -lpthread -o test_regressions
1716

1817
#include "class.h"
1918
#include <assert.h>
@@ -52,10 +51,12 @@ static void cleanup(const char *path) {
5251
// Failing push endpoint keeps payloads in _pending_backup for inspection.
5352
static arkilian *open_db(const char *path) {
5453
cleanup(path); // idempotent across re-runs
54+
#ifndef _WIN32
5555
setenv("ARKILIAN_ENABLE_BACKUP", "0", 1);
5656
setenv("ARKILIAN_API_KEY", "test-key", 1);
5757
setenv("ARKILIAN_SKIP_STARTUP_AUTH", "1", 1);
5858
setenv("ARKILIAN_CONTROL_URL", "http://127.0.0.1:1", 1);
59+
#endif
5960
arkilian *db = NULL;
6061
int rc = db_init(&db, path);
6162
assert(rc == 0 && "db_init failed");

0 commit comments

Comments
 (0)