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:
Tim Rühsen
2017-10-03 21:26:45 +02:00
parent 3b1fe395c8
commit a819be12df
2 changed files with 9 additions and 1 deletions

View File

@ -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,

View File

@ -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;