summaryrefslogtreecommitdiffstats
path: root/.github/scripts
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2024-05-31 12:58:14 -0400
committerGitHub <noreply@github.com>2024-05-31 12:58:14 -0400
commit763748593c4dccbd3d6e35ca8fc54ba7c0a09458 (patch)
treec0a3217ba4ebe7d0b3d92ff1aa3902214c3bc12a /.github/scripts
parent0f15e7395f10312689b157e704661858d374c0c6 (diff)
Correctly handle eBPF check in package test script. (#17794)
Diffstat (limited to '.github/scripts')
-rwxr-xr-x.github/scripts/pkg-test.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/.github/scripts/pkg-test.sh b/.github/scripts/pkg-test.sh
index 81bafddab4..f0c0dc11a6 100755
--- a/.github/scripts/pkg-test.sh
+++ b/.github/scripts/pkg-test.sh
@@ -21,7 +21,9 @@ install_debian_like() {
! -name '*dbgsym*' ! -name '*cups*' ! -name '*freeipmi*') || exit 3
# Install testing tools
- apt-get install -y --no-install-recommends curl "${netcat}" jq || exit 1
+ apt-get install -y --no-install-recommends curl dpkg-dev "${netcat}" jq || exit 1
+
+ dpkg-architecture --equal amd64 || NETDATA_SKIP_EBPF=1
}
install_fedora_like() {
@@ -40,6 +42,8 @@ install_fedora_like() {
# Install testing tools
"${PKGMGR}" install -y curl nc jq || exit 1
+
+ [ "$(rpm --eval '%{_build_arch}')" = "x86_64" ] || NETDATA_SKIP_EBPF=1
}
install_centos() {
@@ -62,6 +66,8 @@ install_centos() {
# Install testing tools
# shellcheck disable=SC2086
"${PKGMGR}" install -y ${opts} curl nc jq || exit 1
+
+ [ "$(rpm --eval '%{_build_arch}')" = "x86_64" ] || NETDATA_SKIP_EBPF=1
}
install_amazon_linux() {
@@ -78,6 +84,8 @@ install_amazon_linux() {
# Install testing tools
# shellcheck disable=SC2086
"${PKGMGR}" install -y ${opts} curl nc jq || exit 1
+
+ [ "$(rpm --eval '%{_build_arch}')" = "x86_64" ] || NETDATA_SKIP_EBPF=1
}
install_suse_like() {
@@ -90,6 +98,8 @@ install_suse_like() {
# Install testing tools
zypper install -y --allow-downgrade --no-recommends curl netcat-openbsd jq || exit 1
+
+ [ "$(rpm --eval '%{_build_arch}')" = "x86_64" ] || NETDATA_SKIP_EBPF=1
}
dump_log() {
@@ -103,7 +113,7 @@ case "${DISTRO}" in
fedora | oraclelinux)
install_fedora_like
;;
- centos| centos-stream | rockylinux | almalinux)
+ centos | centos-stream | rockylinux | almalinux)
install_centos
;;
amazonlinux)
@@ -123,7 +133,7 @@ trap dump_log EXIT
export NETDATA_LIBEXEC_PREFIX=/usr/libexec/netdata
export NETDATA_SKIP_LIBEXEC_PARTS="logs-management|freeipmi|xenstat|nfacct|cups"
-if [ "$(uname -m)" != "x86_64" ]; then
+if [ -n "${NETDATA_SKIP_EBPF}" ]; then
export NETDATA_SKIP_LIBEXEC_PARTS="${NETDATA_SKIP_LIBEXEC_PARTS}|ebpf"
fi