2019-11-14 18:28:31 +08:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
#
|
|
|
|
# Check if find_package(Libevent COMPONENTS xxx) can get the correct library.
|
|
|
|
# Note: this script has only been tested on python3.
|
|
|
|
# Usage:
|
|
|
|
# cd cmake-build-dir
|
|
|
|
# cmake <options> .. && cmake --build .
|
|
|
|
# python /path/to/test-export.py [static|shared]
|
|
|
|
|
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
import shutil
|
|
|
|
import platform
|
|
|
|
import subprocess
|
|
|
|
import tempfile
|
|
|
|
|
|
|
|
results = ("success", "failure")
|
|
|
|
FNULL = open(os.devnull, 'wb')
|
|
|
|
script_dir = os.path.split(os.path.realpath(sys.argv[0]))[0]
|
|
|
|
# working_dir is cmake build dir
|
|
|
|
working_dir = os.getcwd()
|
|
|
|
if len(sys.argv) > 1 and sys.argv[1] == "static":
|
|
|
|
link_type = sys.argv[1]
|
|
|
|
else:
|
|
|
|
link_type = "shared"
|
|
|
|
|
|
|
|
|
|
|
|
def exec_cmd(cmd, silent):
|
Add CI checks for OpenBSD (#1326)
Initially 6.9 and 7.1 had been added, however due to some issues (you can read
about them below) 6.9 had been disabled.
netbsd 6.9 does not have correct library namings for autotools:
2022-08-17T04:59:58.8339420Z libtool: link: (cd ".libs" && rm -f "libevent.so.1.0" && ln -s "libevent-2.2.so.1.0" "libevent.so.1.0")
$ grep ^library_names= libevent.la·
library_names='libevent-2.2.so.1.0 libevent.so.1.0'
# And this is wrong, it should be:
libtool: link: (cd ".libs" && rm -f "libevent-2.2.so.1" && ln -s "libevent-2.2.so.1.0.0" "libevent-2.2.so.1")
libtool: link: (cd ".libs" && rm -f "libevent.so" && ln -s "libevent-2.2.so.1.0.0" "libevent.so")
library_names='libevent-2.2.so.1.0.0 libevent-2.2.so.1 libevent.so'
**And I think that 7.1 should also fail, however it has system-wide libevent installed with evdns in the libevent.so**
Also there are some issues with `TEST_EXPORT_SHARED` test, because of libraries naming:
2022-09-13T06:38:29.2150790Z [test-export] test for install tree(in system-wide path)
2022-09-13T06:38:29.2151500Z [test-export] fail: link core and run core expects success but gets failure.
2022-09-13T06:38:29.2063870Z /usr/bin/cc CMakeFiles/test-export.dir/test-export.c.o -o test-export -L/usr/local/lib -Wl,-z,origin,-rpath,/usr/local/lib -levent_core-2.2 -lpthread -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib·
2022-09-13T06:38:29.2152190Z ld: error: unable to find library -levent_core-2.2
2022-09-13T06:38:28.3915680Z -- Install configuration: "Release"
2022-09-13T06:38:28.3916700Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1.0.0
2022-09-13T06:38:28.3917110Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1
2022-09-13T06:38:28.3917480Z -- Up-to-date: /usr/local/lib/libevent_core.so
# no libevent_core-2.2.so
So I have to disable it too.
Co-authored-by: Azat Khuzhin <azat@libevent.org>
2022-11-13 20:39:17 +08:00
|
|
|
p = subprocess.Popen(cmd, shell=True)
|
2019-11-14 18:28:31 +08:00
|
|
|
p.communicate()
|
|
|
|
return p.poll()
|
|
|
|
|
|
|
|
|
|
|
|
def link_and_run(link, code):
|
|
|
|
"""Check if the source code matches the library component.
|
|
|
|
|
|
|
|
Compile source code relative to one component and link to another component.
|
|
|
|
Then run the generated executor.
|
|
|
|
|
|
|
|
Args:
|
|
|
|
link: The name of component that the source code will link with.
|
|
|
|
code: The source code related component name.
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
Returns 0 if links and runs successfully, otherwise 1.
|
|
|
|
"""
|
Add CI checks for OpenBSD (#1326)
Initially 6.9 and 7.1 had been added, however due to some issues (you can read
about them below) 6.9 had been disabled.
netbsd 6.9 does not have correct library namings for autotools:
2022-08-17T04:59:58.8339420Z libtool: link: (cd ".libs" && rm -f "libevent.so.1.0" && ln -s "libevent-2.2.so.1.0" "libevent.so.1.0")
$ grep ^library_names= libevent.la·
library_names='libevent-2.2.so.1.0 libevent.so.1.0'
# And this is wrong, it should be:
libtool: link: (cd ".libs" && rm -f "libevent-2.2.so.1" && ln -s "libevent-2.2.so.1.0.0" "libevent-2.2.so.1")
libtool: link: (cd ".libs" && rm -f "libevent.so" && ln -s "libevent-2.2.so.1.0.0" "libevent.so")
library_names='libevent-2.2.so.1.0.0 libevent-2.2.so.1 libevent.so'
**And I think that 7.1 should also fail, however it has system-wide libevent installed with evdns in the libevent.so**
Also there are some issues with `TEST_EXPORT_SHARED` test, because of libraries naming:
2022-09-13T06:38:29.2150790Z [test-export] test for install tree(in system-wide path)
2022-09-13T06:38:29.2151500Z [test-export] fail: link core and run core expects success but gets failure.
2022-09-13T06:38:29.2063870Z /usr/bin/cc CMakeFiles/test-export.dir/test-export.c.o -o test-export -L/usr/local/lib -Wl,-z,origin,-rpath,/usr/local/lib -levent_core-2.2 -lpthread -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib·
2022-09-13T06:38:29.2152190Z ld: error: unable to find library -levent_core-2.2
2022-09-13T06:38:28.3915680Z -- Install configuration: "Release"
2022-09-13T06:38:28.3916700Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1.0.0
2022-09-13T06:38:28.3917110Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1
2022-09-13T06:38:28.3917480Z -- Up-to-date: /usr/local/lib/libevent_core.so
# no libevent_core-2.2.so
So I have to disable it too.
Co-authored-by: Azat Khuzhin <azat@libevent.org>
2022-11-13 20:39:17 +08:00
|
|
|
exec_cmd("cmake --build . -v --target clean", True)
|
2020-01-20 21:15:26 +08:00
|
|
|
arch = ''
|
2022-12-01 18:39:52 +01:00
|
|
|
vcpkg = ''
|
|
|
|
openssldir = ''
|
|
|
|
mbedtlsdir = ''
|
2019-11-14 18:28:31 +08:00
|
|
|
if platform.system() == "Windows":
|
2020-01-20 21:15:26 +08:00
|
|
|
arch = '-A x64'
|
2022-12-01 18:39:52 +01:00
|
|
|
vcpkg_root = os.environ.get('VCPKG_ROOT')
|
|
|
|
if vcpkg_root is not None:
|
|
|
|
vcpkg = f"-DCMAKE_TOOLCHAIN_FILE={vcpkg_root}/scripts/buildsystems/vcpkg.cmake"
|
|
|
|
elif platform.system() == "Darwin":
|
2024-05-04 17:42:26 +08:00
|
|
|
openssldir = '-DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl'
|
|
|
|
mbedtlsdir = '-DMBEDTLS_ROOT_DIR=/opt/homebrew/opt/mbedtls@2'
|
2022-12-01 18:39:52 +01:00
|
|
|
cmd = f"cmake .." \
|
|
|
|
f" {arch}" \
|
|
|
|
f" {vcpkg}" \
|
|
|
|
f" -DEVENT__LINK_COMPONENT={link}" \
|
|
|
|
f" -DEVENT__CODE_COMPONENT={code}" \
|
|
|
|
f" {openssldir}" \
|
|
|
|
f" {mbedtlsdir}"
|
2019-11-14 18:28:31 +08:00
|
|
|
if link_type == "static":
|
|
|
|
cmd = "".join([cmd, " -DLIBEVENT_STATIC_LINK=1"])
|
|
|
|
r = exec_cmd(cmd, True)
|
|
|
|
if r == 0:
|
Add CI checks for OpenBSD (#1326)
Initially 6.9 and 7.1 had been added, however due to some issues (you can read
about them below) 6.9 had been disabled.
netbsd 6.9 does not have correct library namings for autotools:
2022-08-17T04:59:58.8339420Z libtool: link: (cd ".libs" && rm -f "libevent.so.1.0" && ln -s "libevent-2.2.so.1.0" "libevent.so.1.0")
$ grep ^library_names= libevent.la·
library_names='libevent-2.2.so.1.0 libevent.so.1.0'
# And this is wrong, it should be:
libtool: link: (cd ".libs" && rm -f "libevent-2.2.so.1" && ln -s "libevent-2.2.so.1.0.0" "libevent-2.2.so.1")
libtool: link: (cd ".libs" && rm -f "libevent.so" && ln -s "libevent-2.2.so.1.0.0" "libevent.so")
library_names='libevent-2.2.so.1.0.0 libevent-2.2.so.1 libevent.so'
**And I think that 7.1 should also fail, however it has system-wide libevent installed with evdns in the libevent.so**
Also there are some issues with `TEST_EXPORT_SHARED` test, because of libraries naming:
2022-09-13T06:38:29.2150790Z [test-export] test for install tree(in system-wide path)
2022-09-13T06:38:29.2151500Z [test-export] fail: link core and run core expects success but gets failure.
2022-09-13T06:38:29.2063870Z /usr/bin/cc CMakeFiles/test-export.dir/test-export.c.o -o test-export -L/usr/local/lib -Wl,-z,origin,-rpath,/usr/local/lib -levent_core-2.2 -lpthread -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib·
2022-09-13T06:38:29.2152190Z ld: error: unable to find library -levent_core-2.2
2022-09-13T06:38:28.3915680Z -- Install configuration: "Release"
2022-09-13T06:38:28.3916700Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1.0.0
2022-09-13T06:38:28.3917110Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1
2022-09-13T06:38:28.3917480Z -- Up-to-date: /usr/local/lib/libevent_core.so
# no libevent_core-2.2.so
So I have to disable it too.
Co-authored-by: Azat Khuzhin <azat@libevent.org>
2022-11-13 20:39:17 +08:00
|
|
|
r = exec_cmd('cmake --build . -v', True)
|
2019-11-14 18:28:31 +08:00
|
|
|
if r == 0:
|
|
|
|
r = exec_cmd('ctest', True)
|
|
|
|
if r != 0:
|
|
|
|
r = 1
|
|
|
|
return r
|
|
|
|
|
|
|
|
# expect 0:success 1:failure
|
|
|
|
def testcase(link, code, expect):
|
|
|
|
r = link_and_run(link, code)
|
|
|
|
if link == "":
|
|
|
|
link = "all"
|
|
|
|
if code == "":
|
|
|
|
code = "all"
|
|
|
|
if r != expect:
|
|
|
|
print('[test-export] fail: link %s and run %s expects %s but gets %s.' %
|
|
|
|
(link, code, results[expect], results[r]))
|
|
|
|
sys.exit(1)
|
|
|
|
else:
|
|
|
|
print('[test-export] success: link %s and run %s expects and gets %s.' %
|
|
|
|
(link, code, results[r]))
|
|
|
|
|
|
|
|
# Dependency relationships between libevent libraries:
|
|
|
|
# core: none
|
|
|
|
# extra: core
|
|
|
|
# pthreads: core,pthread
|
|
|
|
# openssl: core,openssl
|
|
|
|
def test_group():
|
|
|
|
testcase("core", "core", 0)
|
|
|
|
testcase("extra", "extra", 0)
|
|
|
|
testcase("openssl", "openssl", 0)
|
2020-05-28 17:14:46 +08:00
|
|
|
testcase("mbedtls", "mbedtls", 0)
|
2019-11-14 18:28:31 +08:00
|
|
|
testcase("", "", 0)
|
|
|
|
testcase("extra", "core", 0)
|
|
|
|
testcase("openssl", "core", 0)
|
2020-05-28 17:14:46 +08:00
|
|
|
testcase("mbedtls", "core", 0)
|
2019-11-14 18:28:31 +08:00
|
|
|
testcase("core", "extra", 1)
|
|
|
|
testcase("core", "openssl", 1)
|
|
|
|
testcase("extra", "openssl", 1)
|
|
|
|
testcase("openssl", "extra", 1)
|
2020-05-28 17:14:46 +08:00
|
|
|
testcase("core", "mbedtls", 1)
|
|
|
|
testcase("extra", "mbedtls", 1)
|
|
|
|
testcase("mbedtls", "extra", 1)
|
2019-11-14 18:28:31 +08:00
|
|
|
if platform.system() != "Windows":
|
|
|
|
testcase("pthreads", "pthreads", 0)
|
|
|
|
testcase("pthreads", "core", 0)
|
|
|
|
testcase("core", "pthreads", 1)
|
|
|
|
testcase("extra", "pthreads", 1)
|
|
|
|
testcase("pthreads", "extra", 1)
|
|
|
|
testcase("pthreads", "openssl", 1)
|
|
|
|
testcase("openssl", "pthreads", 1)
|
2020-05-28 17:14:46 +08:00
|
|
|
testcase("pthreads", "mbedtls", 1)
|
|
|
|
testcase("mbedtls", "pthreads", 1)
|
2019-11-14 18:28:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
shutil.rmtree(os.path.join(script_dir, "build"), ignore_errors=True)
|
|
|
|
|
|
|
|
|
|
|
|
def run_test_group():
|
|
|
|
os.chdir(script_dir)
|
|
|
|
if not os.path.isdir("build"):
|
|
|
|
os.mkdir("build")
|
|
|
|
os.chdir("build")
|
|
|
|
test_group()
|
|
|
|
os.chdir(working_dir)
|
|
|
|
|
|
|
|
|
|
|
|
need_exportdll = False
|
|
|
|
if link_type == "shared" and platform.system() == "Windows":
|
|
|
|
need_exportdll = True
|
|
|
|
|
|
|
|
# On Windows, we need to add the directory containing the dll to the
|
|
|
|
# 'PATH' environment variable so that the program can call it.
|
|
|
|
def export_dll(dir):
|
|
|
|
if need_exportdll:
|
|
|
|
os.environ["PATH"] += os.pathsep + dir
|
|
|
|
|
|
|
|
|
|
|
|
def unexport_dll(dir):
|
|
|
|
if need_exportdll:
|
|
|
|
paths = os.environ["PATH"].split(os.pathsep)
|
|
|
|
paths = list(set(paths))
|
|
|
|
if dir in paths:
|
|
|
|
paths.remove(dir)
|
|
|
|
os.environ["PATH"] = os.pathsep.join(paths)
|
|
|
|
|
|
|
|
|
|
|
|
print("[test-export] use %s library" % link_type)
|
|
|
|
|
|
|
|
# Test for build tree.
|
|
|
|
print("[test-export] test for build tree")
|
|
|
|
dllpath = os.path.join(working_dir, "bin", "Debug")
|
|
|
|
os.environ["CMAKE_PREFIX_PATH"] = working_dir
|
|
|
|
export_dll(dllpath)
|
|
|
|
run_test_group()
|
|
|
|
del os.environ["CMAKE_PREFIX_PATH"]
|
|
|
|
unexport_dll(dllpath)
|
|
|
|
|
|
|
|
# Install libevent libraries to system path. Remove LibeventConfig.cmake
|
|
|
|
# from build directory to avoid confusion when using find_package().
|
|
|
|
print("[test-export] test for install tree(in system-wide path)")
|
|
|
|
if platform.system() == "Windows":
|
|
|
|
prefix = "C:\\Program Files\\libevent"
|
|
|
|
dllpath = os.path.join(prefix, "lib")
|
|
|
|
else:
|
|
|
|
prefix = "/usr/local"
|
2022-03-10 23:11:14 +03:00
|
|
|
exec_cmd('cmake -DCMAKE_SKIP_INSTALL_RPATH=OFF -DCMAKE_INSTALL_PREFIX="%s" ..' % prefix, True)
|
Add CI checks for OpenBSD (#1326)
Initially 6.9 and 7.1 had been added, however due to some issues (you can read
about them below) 6.9 had been disabled.
netbsd 6.9 does not have correct library namings for autotools:
2022-08-17T04:59:58.8339420Z libtool: link: (cd ".libs" && rm -f "libevent.so.1.0" && ln -s "libevent-2.2.so.1.0" "libevent.so.1.0")
$ grep ^library_names= libevent.la·
library_names='libevent-2.2.so.1.0 libevent.so.1.0'
# And this is wrong, it should be:
libtool: link: (cd ".libs" && rm -f "libevent-2.2.so.1" && ln -s "libevent-2.2.so.1.0.0" "libevent-2.2.so.1")
libtool: link: (cd ".libs" && rm -f "libevent.so" && ln -s "libevent-2.2.so.1.0.0" "libevent.so")
library_names='libevent-2.2.so.1.0.0 libevent-2.2.so.1 libevent.so'
**And I think that 7.1 should also fail, however it has system-wide libevent installed with evdns in the libevent.so**
Also there are some issues with `TEST_EXPORT_SHARED` test, because of libraries naming:
2022-09-13T06:38:29.2150790Z [test-export] test for install tree(in system-wide path)
2022-09-13T06:38:29.2151500Z [test-export] fail: link core and run core expects success but gets failure.
2022-09-13T06:38:29.2063870Z /usr/bin/cc CMakeFiles/test-export.dir/test-export.c.o -o test-export -L/usr/local/lib -Wl,-z,origin,-rpath,/usr/local/lib -levent_core-2.2 -lpthread -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib·
2022-09-13T06:38:29.2152190Z ld: error: unable to find library -levent_core-2.2
2022-09-13T06:38:28.3915680Z -- Install configuration: "Release"
2022-09-13T06:38:28.3916700Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1.0.0
2022-09-13T06:38:28.3917110Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1
2022-09-13T06:38:28.3917480Z -- Up-to-date: /usr/local/lib/libevent_core.so
# no libevent_core-2.2.so
So I have to disable it too.
Co-authored-by: Azat Khuzhin <azat@libevent.org>
2022-11-13 20:39:17 +08:00
|
|
|
exec_cmd('cmake --build . -v --target install', True)
|
2019-11-14 18:28:31 +08:00
|
|
|
os.environ["CMAKE_PREFIX_PATH"] = os.path.join(prefix, "lib/cmake/libevent")
|
|
|
|
export_dll(dllpath)
|
|
|
|
run_test_group()
|
|
|
|
unexport_dll(dllpath)
|
|
|
|
del os.environ["CMAKE_PREFIX_PATH"]
|
|
|
|
|
|
|
|
# Uninstall the libraries installed in the above steps. Install the libraries
|
|
|
|
# into a temporary directory. Same as above, remove LibeventConfig.cmake from
|
|
|
|
# build directory to avoid confusion when using find_package().
|
|
|
|
print("[test-export] test for install tree(in non-system-wide path)")
|
Add CI checks for OpenBSD (#1326)
Initially 6.9 and 7.1 had been added, however due to some issues (you can read
about them below) 6.9 had been disabled.
netbsd 6.9 does not have correct library namings for autotools:
2022-08-17T04:59:58.8339420Z libtool: link: (cd ".libs" && rm -f "libevent.so.1.0" && ln -s "libevent-2.2.so.1.0" "libevent.so.1.0")
$ grep ^library_names= libevent.la·
library_names='libevent-2.2.so.1.0 libevent.so.1.0'
# And this is wrong, it should be:
libtool: link: (cd ".libs" && rm -f "libevent-2.2.so.1" && ln -s "libevent-2.2.so.1.0.0" "libevent-2.2.so.1")
libtool: link: (cd ".libs" && rm -f "libevent.so" && ln -s "libevent-2.2.so.1.0.0" "libevent.so")
library_names='libevent-2.2.so.1.0.0 libevent-2.2.so.1 libevent.so'
**And I think that 7.1 should also fail, however it has system-wide libevent installed with evdns in the libevent.so**
Also there are some issues with `TEST_EXPORT_SHARED` test, because of libraries naming:
2022-09-13T06:38:29.2150790Z [test-export] test for install tree(in system-wide path)
2022-09-13T06:38:29.2151500Z [test-export] fail: link core and run core expects success but gets failure.
2022-09-13T06:38:29.2063870Z /usr/bin/cc CMakeFiles/test-export.dir/test-export.c.o -o test-export -L/usr/local/lib -Wl,-z,origin,-rpath,/usr/local/lib -levent_core-2.2 -lpthread -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib·
2022-09-13T06:38:29.2152190Z ld: error: unable to find library -levent_core-2.2
2022-09-13T06:38:28.3915680Z -- Install configuration: "Release"
2022-09-13T06:38:28.3916700Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1.0.0
2022-09-13T06:38:28.3917110Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1
2022-09-13T06:38:28.3917480Z -- Up-to-date: /usr/local/lib/libevent_core.so
# no libevent_core-2.2.so
So I have to disable it too.
Co-authored-by: Azat Khuzhin <azat@libevent.org>
2022-11-13 20:39:17 +08:00
|
|
|
exec_cmd("cmake --build . -v --target uninstall", True)
|
2019-11-14 18:28:31 +08:00
|
|
|
tempdir = tempfile.TemporaryDirectory()
|
2022-03-10 23:11:14 +03:00
|
|
|
cmd = 'cmake -DCMAKE_SKIP_INSTALL_RPATH=OFF -DCMAKE_INSTALL_PREFIX="%s" ..' % tempdir.name
|
2019-11-14 18:28:31 +08:00
|
|
|
exec_cmd(cmd, True)
|
Add CI checks for OpenBSD (#1326)
Initially 6.9 and 7.1 had been added, however due to some issues (you can read
about them below) 6.9 had been disabled.
netbsd 6.9 does not have correct library namings for autotools:
2022-08-17T04:59:58.8339420Z libtool: link: (cd ".libs" && rm -f "libevent.so.1.0" && ln -s "libevent-2.2.so.1.0" "libevent.so.1.0")
$ grep ^library_names= libevent.la·
library_names='libevent-2.2.so.1.0 libevent.so.1.0'
# And this is wrong, it should be:
libtool: link: (cd ".libs" && rm -f "libevent-2.2.so.1" && ln -s "libevent-2.2.so.1.0.0" "libevent-2.2.so.1")
libtool: link: (cd ".libs" && rm -f "libevent.so" && ln -s "libevent-2.2.so.1.0.0" "libevent.so")
library_names='libevent-2.2.so.1.0.0 libevent-2.2.so.1 libevent.so'
**And I think that 7.1 should also fail, however it has system-wide libevent installed with evdns in the libevent.so**
Also there are some issues with `TEST_EXPORT_SHARED` test, because of libraries naming:
2022-09-13T06:38:29.2150790Z [test-export] test for install tree(in system-wide path)
2022-09-13T06:38:29.2151500Z [test-export] fail: link core and run core expects success but gets failure.
2022-09-13T06:38:29.2063870Z /usr/bin/cc CMakeFiles/test-export.dir/test-export.c.o -o test-export -L/usr/local/lib -Wl,-z,origin,-rpath,/usr/local/lib -levent_core-2.2 -lpthread -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib·
2022-09-13T06:38:29.2152190Z ld: error: unable to find library -levent_core-2.2
2022-09-13T06:38:28.3915680Z -- Install configuration: "Release"
2022-09-13T06:38:28.3916700Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1.0.0
2022-09-13T06:38:28.3917110Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1
2022-09-13T06:38:28.3917480Z -- Up-to-date: /usr/local/lib/libevent_core.so
# no libevent_core-2.2.so
So I have to disable it too.
Co-authored-by: Azat Khuzhin <azat@libevent.org>
2022-11-13 20:39:17 +08:00
|
|
|
exec_cmd("cmake --build . -v --target install", True)
|
2019-11-14 18:28:31 +08:00
|
|
|
os.environ["CMAKE_PREFIX_PATH"] = os.path.join(tempdir.name, "lib/cmake/libevent")
|
|
|
|
dllpath = os.path.join(tempdir.name, "lib")
|
|
|
|
export_dll(dllpath)
|
|
|
|
run_test_group()
|
|
|
|
unexport_dll(dllpath)
|
|
|
|
del os.environ["CMAKE_PREFIX_PATH"]
|
|
|
|
|
|
|
|
print("[test-export] all testcases have run successfully")
|