1
0
mirror of https://github.com/containers/youki synced 2024-11-23 09:21:57 +01:00
youki/scripts/features_test.sh
Jorge Prendes ff79c54968
(feat) add support for musl using cross-rs (#2536)
* add cross configuration for musl

Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>

* use cargo.sh wapper in build.sh

Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>

* make tests build with musl

Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>

* add targets to run musl tests

Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>

* Use cargo.sh wrapper and cross in CI

Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>

* Update scripts/cargo.sh

Co-Authored-By: adrianalin <pop.adrian61@gmail.com>
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>

* Use glibc as cross default target

---------

Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Co-authored-by: adrianalin <pop.adrian61@gmail.com>
2023-12-21 11:50:03 +00:00

35 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
CARGO_SH="$(dirname "$0")/cargo.sh"
test_package_features() {
echo "[feature test] building $1 with features $2"
"$CARGO_SH" build --no-default-features --package "$1" --features "$2"
}
test_package_features "libcontainer" "v1"
test_package_features "libcontainer" "v2"
test_package_features "libcontainer" "systemd"
test_package_features "libcontainer" "v2 cgroupsv2_devices"
test_package_features "libcontainer" "systemd cgroupsv2_devices"
test_package_features "libcgroups" "v1"
test_package_features "libcgroups" "v2"
test_package_features "libcgroups" "systemd"
test_package_features "libcgroups" "v2 cgroupsv2_devices"
test_package_features "libcgroups" "systemd cgroupsv2_devices"
test_features() {
echo "[feature test] testing features $1"
"$CARGO_SH" build --no-default-features --features "$1"
"$CARGO_SH" test run --no-default-features --features "$1"
}
test_features "v1"
test_features "v2"
test_features "systemd"
test_features "v2 cgroupsv2_devices"
test_features "systemd cgroupsv2_devices"
exit 0