Skip to content

Commit 1934ad4

Browse files
committed
test(linux): remove threaded integration test
1 parent af9cc12 commit 1934ad4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/main.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,20 @@
1010
#include <stdlib.h>
1111
#include "utils.h"
1212
#include "sqlite3.h"
13+
14+
#ifndef __linux__
1315
#ifdef _WIN32
1416
#include <windows.h>
1517
#else
1618
#include <pthread.h>
1719
#endif
20+
#define PEERS 5
21+
#endif
1822

1923
#ifdef CLOUDSYNC_LOAD_FROM_SOURCES
2024
#include "cloudsync.h"
2125
#endif
2226

23-
#define PEERS 5
2427
#define DB_PATH "health-track.sqlite"
2528
#define EXT_PATH "./dist/cloudsync"
2629
#define RCHECK if (rc != SQLITE_OK) goto abort_test;
@@ -315,6 +318,7 @@ int test_report(const char *description, int rc){
315318
return rc;
316319
}
317320

321+
#ifndef __linux__
318322
#ifdef _WIN32
319323
DWORD WINAPI worker(LPVOID arg) {
320324
#else
@@ -331,6 +335,7 @@ void* worker(void* arg) {
331335

332336
return NULL;
333337
}
338+
#endif
334339

335340
int main (void) {
336341
int rc = SQLITE_OK;
@@ -352,6 +357,7 @@ int main (void) {
352357

353358
remove(DB_PATH); // remove the database file
354359

360+
#ifndef __linux__
355361
#ifdef _WIN32
356362
HANDLE threads[PEERS];
357363
#else
@@ -386,6 +392,7 @@ int main (void) {
386392
pthread_join(threads[i], NULL);
387393
#endif
388394
}
395+
#endif
389396

390397
printf("\n");
391398
return rc;

0 commit comments

Comments
 (0)