Skip to content

Commit c538c48

Browse files
authored
chore: update examples to run-10 and add test-examples scripts (#70)
Signed-off-by: ralph squillace <ralph@squillace.com> Signed-off-by: Danilo Chiarlone <danbugs@gmail.com>
1 parent d42ff50 commit c538c48

15 files changed

Lines changed: 235 additions & 46 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
9090
cargo install just
9191

9292
# 2. kraft-hyperlight (builds Unikraft kernels)
93-
git clone --branch hyperlight-platform https://github.com/danbugs/kraftkit.git
93+
git clone --branch plat-hyperlight https://github.com/unikraft/kraftkit/
9494
cd kraftkit && go build -o kraft-hyperlight ./cmd/kraft
9595
sudo mv kraft-hyperlight /usr/local/bin/ && cd ..
9696

examples/dotnet-nativeaot/Justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ ghcr_kernel := "ghcr.io/hyperlight-dev/hyperlight-unikraft/dotnet-nativeaot-kern
1919
run:
2020
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --memory {{memory}}
2121

22-
# Run 5 times via snapshot/restore
23-
run-5:
24-
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 4 --memory {{memory}}
22+
# Run 10 times via snapshot/restore
23+
run-10:
24+
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 9 --memory {{memory}}
2525

2626
# Build rootfs via Docker (cross-platform)
2727
rootfs:

examples/dotnet/Justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ ghcr_kernel := "ghcr.io/hyperlight-dev/hyperlight-unikraft/dotnet-kernel:latest"
1919
run:
2020
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --memory {{memory}}
2121

22-
# Run 5 times via snapshot/restore
23-
run-5:
24-
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 4 --memory {{memory}}
22+
# Run 10 times via snapshot/restore
23+
run-10:
24+
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 9 --memory {{memory}}
2525

2626
# Build rootfs via Docker (cross-platform)
2727
rootfs:

examples/go/Justfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# go on Hyperlight
22
#
33
# just run - Run once
4-
# just run-5 - Run 5x (snapshot/restore)
4+
# just run-10 - Run 10x (snapshot/restore)
55
# just rootfs - Build rootfs via Docker (cross-platform)
66
# just build - Build/pull kernel
77
# just clean - Remove build artifacts
@@ -19,9 +19,9 @@ ghcr_kernel := "ghcr.io/hyperlight-dev/hyperlight-unikraft/go-kernel:latest"
1919
run:
2020
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --memory {{memory}} -- hello
2121

22-
# Run 5 times via snapshot/restore
23-
run-5:
24-
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 4 --memory {{memory}} -- hello
22+
# Run 10 times via snapshot/restore
23+
run-10:
24+
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 9 --memory {{memory}} -- hello
2525

2626
# Build rootfs via Docker (cross-platform)
2727
rootfs:

examples/helloworld-c/Justfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# helloworld-c on Hyperlight
22
#
33
# just run - Run once
4-
# just run-5 - Run 5x (snapshot/restore)
4+
# just run-10 - Run 10x (snapshot/restore)
55
# just rootfs - Build rootfs via Docker (cross-platform)
66
# just build - Build/pull kernel
77
# just clean - Remove build artifacts
@@ -19,9 +19,9 @@ ghcr_kernel := "ghcr.io/hyperlight-dev/hyperlight-unikraft/helloworld-c-kernel:l
1919
run:
2020
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --memory {{memory}}
2121

22-
# Run 5 times via snapshot/restore
23-
run-5:
24-
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 4 --memory {{memory}}
22+
# Run 10 times via snapshot/restore
23+
run-10:
24+
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 9 --memory {{memory}}
2525

2626
# Build rootfs via Docker (cross-platform)
2727
rootfs:

examples/hostfs-posix-c/Justfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ run:
2424
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --memory {{memory}} --mount {{mount_dir}}
2525

2626
[unix]
27-
run-5:
27+
run-10:
2828
mkdir -p {{mount_dir}}
29-
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 4 --memory {{memory}} --mount {{mount_dir}}
29+
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 9 --memory {{memory}} --mount {{mount_dir}}
3030

3131
[windows]
32-
run-5:
32+
run-10:
3333
New-Item -ItemType Directory -Force -Path {{mount_dir}} | Out-Null
34-
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 4 --memory {{memory}} --mount {{mount_dir}}
34+
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 9 --memory {{memory}} --mount {{mount_dir}}
3535

3636
rootfs:
3737
docker build --platform linux/amd64 --target cpio -t {{image}}-cpio .

examples/hostfs-posix-py/Justfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ run:
4141
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --memory {{memory}} --mount {{mount_dir}} -- /hostfs_demo.py
4242

4343
[unix]
44-
run-5:
44+
run-10:
4545
mkdir -p {{mount_dir}}
46-
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 4 --memory {{memory}} --mount {{mount_dir}} -- /hostfs_demo.py
46+
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 9 --memory {{memory}} --mount {{mount_dir}} -- /hostfs_demo.py
4747

4848
[windows]
49-
run-5:
49+
run-10:
5050
New-Item -ItemType Directory -Force -Path {{mount_dir}} | Out-Null
51-
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 4 --memory {{memory}} --mount {{mount_dir}} -- /hostfs_demo.py
51+
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 9 --memory {{memory}} --mount {{mount_dir}} -- /hostfs_demo.py
5252

5353
rootfs:
5454
docker build --platform linux/amd64 --target cpio -t {{image}}-cpio .

examples/nodejs/Justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ ghcr_kernel := "ghcr.io/hyperlight-dev/hyperlight-unikraft/nodejs-kernel:latest"
1919
run:
2020
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --memory {{memory}} -- /app/hello.js
2121

22-
# Run 5 times via snapshot/restore
23-
run-5:
24-
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 4 --memory {{memory}} -- /app/hello.js
22+
# Run 10 times via snapshot/restore
23+
run-10:
24+
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 9 --memory {{memory}} -- /app/hello.js
2525

2626
# Build rootfs via Docker (cross-platform)
2727
rootfs:

examples/powershell/Justfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# powershell on Hyperlight
22
#
33
# just run - Run once
4-
# just run-5 - Run 5x (snapshot/restore)
4+
# just run-10 - Run 10x (snapshot/restore)
55
# just rootfs - Build rootfs via Docker (cross-platform)
66
# just build - Build/pull kernel
77
# just clean - Remove build artifacts
@@ -19,9 +19,9 @@ ghcr_kernel := "ghcr.io/hyperlight-dev/hyperlight-unikraft/powershell-kernel:lat
1919
run:
2020
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --memory {{memory}} -- -NoProfile -File /scripts/hello.ps1
2121

22-
# Run 5 times via snapshot/restore
23-
run-5:
24-
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 4 --memory {{memory}} -- -NoProfile -File /scripts/hello.ps1
22+
# Run 10 times via snapshot/restore
23+
run-10:
24+
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 9 --memory {{memory}} -- -NoProfile -File /scripts/hello.ps1
2525

2626
# Build rootfs via Docker (cross-platform)
2727
rootfs:

examples/python-tools/Justfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# python-tools on Hyperlight
22
#
33
# just run - Run once
4-
# just run-5 - Run 5x (snapshot/restore)
4+
# just run-10 - Run 10x (snapshot/restore)
55
# just rootfs - Build rootfs via Docker (cross-platform)
66
# just build - Build/pull kernel
77
# just clean - Remove build artifacts
@@ -19,9 +19,9 @@ ghcr_kernel := "ghcr.io/hyperlight-dev/hyperlight-unikraft/python-tools-kernel:l
1919
run:
2020
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --memory {{memory}} --enable-tools -- /test_tools.py
2121

22-
# Run 5 times via snapshot/restore
23-
run-5:
24-
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 4 --memory {{memory}} --enable-tools -- /test_tools.py
22+
# Run 10 times via snapshot/restore
23+
run-10:
24+
hyperlight-unikraft {{kernel}} --initrd {{initrd}} --repeat 9 --memory {{memory}} --enable-tools -- /test_tools.py
2525

2626
# Build rootfs via Docker (cross-platform)
2727
rootfs:

0 commit comments

Comments
 (0)