1
0
mirror of https://github.com/containers/youki synced 2024-11-23 17:32:15 +01:00
youki/scripts/features_test.sh
Eric Fang f4e7e300e6
Fix the feature test and turn on in CI (#2060)
* reworked the justfile to be explicit with path

Signed-off-by: yihuaf <yihuaf@unkies.org>

* fix the feature tests

Signed-off-by: yihuaf <yihuaf@unkies.org>

* add the musl test

Signed-off-by: yihuaf <yihuaf@unkies.org>

* moving all stub into a single dir

Signed-off-by: yihuaf <yihuaf@unkies.org>

---------

Signed-off-by: yihuaf <yihuaf@unkies.org>
2023-06-19 21:21:18 +09:00

33 lines
1021 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
test_package_features() {
echo "[feature test] testing $1 with features $2"
cargo 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 build --no-default-features --features "$1"
cargo 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