Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions slices/libtcnative-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package: libtcnative-2

essential:
libtcnative-2_copyright:

slices:
libs:
essential:
libapr1t64_libs:
libc6_libs:
libssl3t64_libs:
contents:
/usr/lib/*-linux-*/libtcnative-2.so*:

copyright:
contents:
/usr/share/doc/libtcnative-2/copyright:
22 changes: 22 additions & 0 deletions tests/spread/integration/libtcnative-2/task.yaml
Comment thread
vpa1977 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
summary: Integration tests for libtcnative-2

execute: |
# libtcnative-2 installs tomcat native extensions. run
# tomcat version to validate that they are loaded
rootfs="$(install-slices tomcat10_core libtcnative-2_libs base-files_base coreutils_bins dash_bins openjdk-21-jdk-headless_standard)"
java=$(find "$rootfs" -name java -type f -printf '%P\n' -quit 2>/dev/null)

# Make fake /dev/null and mount /proc
mkdir -p "$rootfs/dev"
touch "$rootfs/dev/null"
chmod +x "$rootfs/dev/null"
mkdir -p "$rootfs/proc"
sudo mount --bind /proc "$rootfs/proc"
trap 'sudo umount "$rootfs/proc"' EXIT

export JAVA_HOME=/$(dirname $(dirname ${java}))
export CATALINA_BASE="/var/lib/tomcat10"
chroot "$rootfs" /usr/share/tomcat10/bin/catalina.sh version \
| grep -q "Apache Tomcat/10"
chroot "$rootfs" /usr/share/tomcat10/bin/catalina.sh configtest 2>&1 \
| grep -q 'Loaded Apache Tomcat Native library'
Loading