diff --git a/tests/test-plugin.c b/tests/test-plugin.c index 3b16042f..3b97c99b 100644 --- a/tests/test-plugin.c +++ b/tests/test-plugin.c @@ -25,6 +25,7 @@ #include // exit() #include // strlen() +#include // access() #include "libtest.h" // #define LARGEFILE (11 << 20) @@ -193,6 +194,11 @@ int main(void) } }; + if (access("./libs/libpluginname.so", R_OK) != 0 + && access("./libs/libpluginname.dll", R_OK) != 0 + && access("./libs/cygpluginname.dll", R_OK) != 0) + exit(77); // likely a static build + wget_test_start_server( WGET_TEST_RESPONSE_URLS, &urls, countof(urls), WGET_TEST_FEATURE_MHD, diff --git a/unit-tests/test-dl.c b/unit-tests/test-dl.c index 3e633727..dd1f0626 100644 --- a/unit-tests/test-dl.c +++ b/unit-tests/test-dl.c @@ -137,7 +137,9 @@ static void copy_file(const char *src, const char *dst) printf(" Copying %s --> %s\n", src, dst); - libassert(stat(src, &statbuf) == 0); + if (stat(src, &statbuf) != 0) + exit(77); // likely a static build + libassert((sfd = open(src, O_RDONLY | O_BINARY)) >= 0); libassert((dfd = open(dst, O_WRONLY | O_CREAT | O_BINARY, statbuf.st_mode)) >= 0); size_remain = statbuf.st_size;