Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit a7bc6f8

Browse files
committed
test nydus on aarch64
1 parent 339affb commit a7bc6f8

File tree

1 file changed

+33
-6
lines changed

1 file changed

+33
-6
lines changed

integration/nydus/nydus_tests.sh

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ if [ "$KATA_HYPERVISOR" != "qemu" ] && [ "$KATA_HYPERVISOR" != "cloud-hypervisor
3636
fi
3737

3838
arch="$(uname -m)"
39-
if [ "$arch" != "x86_64" ]; then
40-
echo "Skip nydus test for $arch, it only works for x86_64 now. See https://github.com/kata-containers/tests/issues/4445"
39+
if [ "$arch" != "x86_64" && "$arch" != "aarch64" ]; then
40+
echo "Skip nydus test for $arch, it only works for x86_64 and aarch64 now. See https://github.com/kata-containers/tests/issues/4445"
4141
exit 0
4242
fi
4343

@@ -58,12 +58,39 @@ function install_from_tarball() {
5858
curl -Ls "$tarball_url" | sudo tar xfz - -C /usr/local/bin --strip-components=1
5959
}
6060

61-
function setup_nydus() {
62-
# install nydus
63-
install_from_tarball "nydus" "nydus-static"
61+
function install_from_source() {
62+
local src_dir=$(mktemp -d)
63+
64+
pushd ${src_dir}
65+
git clone https://github.com/dragonflyoss/image-service.git
66+
67+
pushd image-service
68+
# install nydusd nydus-image nydusctl
69+
make && make install
70+
# install nydusify
71+
make -C contrib/nydusify/ && install -m 755 contrib/nydusify/cmd/nydusify /usr/bin
72+
popd
6473

6574
# install nydus-snapshotter
66-
install_from_tarball "nydus-snapshotter" "nydus-snapshotter"
75+
git clone https://github.com/containerd/nydus-snapshotter.git
76+
make && make install
77+
popd
78+
79+
# clean up temp dir
80+
rm -rf ${src_dir}
81+
}
82+
83+
function setup_nydus() {
84+
85+
if [ "${arch}" == "x86_64" ]; then
86+
# install nydus
87+
install_from_tarball "nydus" "nydus-static"
88+
89+
# install nydus-snapshotter
90+
install_from_tarball "nydus-snapshotter" "nydus-snapshotter"
91+
else
92+
install_from_source
93+
fi
6794

6895
# Config nydus snapshotter
6996
sudo -E cp "$dir_path/nydusd-config.json" /etc/

0 commit comments

Comments
 (0)