summaryrefslogtreecommitdiff
path: root/test-export
diff options
context:
space:
mode:
authorneil <github@neilpang.com>2022-11-13 20:39:17 +0800
committerGitHub <noreply@github.com>2022-11-13 15:39:17 +0300
commit45c66e48795485407646e231b1f106412ce7b1ee (patch)
treedf2fe7be78817b36a6edf7405f50cf5c51197ef0 /test-export
parent1af745d033678333752afcd8724f5d6351561b4e (diff)
downloadlibevent-45c66e48795485407646e231b1f106412ce7b1ee.tar.gz
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>
Diffstat (limited to 'test-export')
-rw-r--r--test-export/test-export.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/test-export/test-export.py b/test-export/test-export.py
index 3320e3b2..9eaf0d63 100644
--- a/test-export/test-export.py
+++ b/test-export/test-export.py
@@ -26,10 +26,7 @@ else:
def exec_cmd(cmd, silent):
- if silent:
- p = subprocess.Popen(cmd, stdout=FNULL, stderr=FNULL, shell=True)
- else:
- p = subprocess.Popen(cmd, shell=True)
+ p = subprocess.Popen(cmd, shell=True)
p.communicate()
return p.poll()
@@ -47,7 +44,7 @@ def link_and_run(link, code):
Returns:
Returns 0 if links and runs successfully, otherwise 1.
"""
- exec_cmd("cmake --build . --target clean", True)
+ exec_cmd("cmake --build . -v --target clean", True)
arch = ''
if platform.system() == "Windows":
arch = '-A x64'
@@ -57,7 +54,7 @@ def link_and_run(link, code):
cmd = "".join([cmd, " -DLIBEVENT_STATIC_LINK=1"])
r = exec_cmd(cmd, True)
if r == 0:
- r = exec_cmd('cmake --build .', True)
+ r = exec_cmd('cmake --build . -v', True)
if r == 0:
r = exec_cmd('ctest', True)
if r != 0:
@@ -177,7 +174,7 @@ if platform.system() == "Windows":
else:
prefix = "/usr/local"
exec_cmd('cmake -DCMAKE_SKIP_INSTALL_RPATH=OFF -DCMAKE_INSTALL_PREFIX="%s" ..' % prefix, True)
-exec_cmd('cmake --build . --target install', True)
+exec_cmd('cmake --build . -v --target install', True)
config_backup()
os.environ["CMAKE_PREFIX_PATH"] = os.path.join(prefix, "lib/cmake/libevent")
export_dll(dllpath)
@@ -189,11 +186,11 @@ del os.environ["CMAKE_PREFIX_PATH"]
# 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)")
-exec_cmd("cmake --build . --target uninstall", True)
+exec_cmd("cmake --build . -v --target uninstall", True)
tempdir = tempfile.TemporaryDirectory()
cmd = 'cmake -DCMAKE_SKIP_INSTALL_RPATH=OFF -DCMAKE_INSTALL_PREFIX="%s" ..' % tempdir.name
exec_cmd(cmd, True)
-exec_cmd("cmake --build . --target install", True)
+exec_cmd("cmake --build . -v --target install", True)
config_backup()
os.environ["CMAKE_PREFIX_PATH"] = os.path.join(tempdir.name, "lib/cmake/libevent")
dllpath = os.path.join(tempdir.name, "lib")