2023-06-19 14:21:18 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
2022-11-08 18:01:29 +01:00
|
|
|
|
2023-12-21 12:50:03 +01:00
|
|
|
CARGO_SH="$(dirname "$0")/cargo.sh"
|
|
|
|
|
2023-06-19 14:21:18 +02:00
|
|
|
test_package_features() {
|
2023-12-21 12:50:03 +01:00
|
|
|
echo "[feature test] building $1 with features $2"
|
|
|
|
"$CARGO_SH" build --no-default-features --package "$1" --features "$2"
|
2023-06-19 14:21:18 +02:00
|
|
|
}
|
2022-11-08 18:01:29 +01:00
|
|
|
|
2023-06-19 14:21:18 +02:00
|
|
|
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"
|
2022-11-08 18:01:29 +01:00
|
|
|
|
2023-06-19 14:21:18 +02:00
|
|
|
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"
|
2023-03-23 18:57:51 +01:00
|
|
|
|
2023-06-19 14:21:18 +02:00
|
|
|
test_features() {
|
|
|
|
echo "[feature test] testing features $1"
|
2023-12-21 12:50:03 +01:00
|
|
|
"$CARGO_SH" build --no-default-features --features "$1"
|
|
|
|
"$CARGO_SH" test run --no-default-features --features "$1"
|
2023-06-19 14:21:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
test_features "v1"
|
|
|
|
test_features "v2"
|
|
|
|
test_features "systemd"
|
|
|
|
test_features "v2 cgroupsv2_devices"
|
|
|
|
test_features "systemd cgroupsv2_devices"
|
2023-03-23 18:57:51 +01:00
|
|
|
|
2022-11-08 18:01:29 +01:00
|
|
|
exit 0
|