mirror of
https://gitlab.com/gnuwget/wget2.git
synced 2026-02-01 14:41:08 +00:00
Skip plugin tests if shared build is disabled
The use of -shared in the LDFLAGS for the plugins does not work with './configure --disable-shared'. Instead of failing the build this patch SKIPs the plugin tests.
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
|
||||
#include <stdlib.h> // exit()
|
||||
#include <string.h> // strlen()
|
||||
#include <unistd.h> // 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,
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user