Skip to content

Commit 5aba74c

Browse files
authored
update download link for kernel,firecracker and jailer (#329)
Signed-off-by: Royce Zhao <[email protected]>
1 parent a536fd0 commit 5aba74c

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

Makefile

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ FIRECRACKER_TARGET?=x86_64-unknown-linux-musl
2424
UID = $(shell id -u)
2525
GID = $(shell id -g)
2626

27+
firecracker_version=v0.24.2
28+
arch=$(shell uname -m)
29+
2730
# The below files are needed and can be downloaded from the internet
28-
testdata_objects = testdata/vmlinux testdata/root-drive.img testdata/firecracker testdata/jailer
29-
firecracker_version = v0.23.0
31+
release_url=https://github.com/firecracker-microvm/firecracker/releases/download/$(firecracker_version)/firecracker-$(firecracker_version)-$(arch).tgz
32+
testdata_objects = testdata/vmlinux testdata/root-drive.img testdata/binaries testdata/jailer testdata/firecracker
33+
testdata_dir = testdata/firecracker.tgz testdata/firecracker_spec-$(firecracker_version).yaml testdata/LICENSE testdata/NOTICE testdata/THIRD-PARTY
3034

3135
# --location is needed to follow redirects on github.com
3236
curl = curl --location
@@ -53,18 +57,20 @@ clean::
5357

5458
distclean: clean
5559
rm -rf $(testdata_objects)
60+
rm -rfv $(testdata_dir)
5661
docker volume rm -f $(CARGO_CACHE_VOLUME_NAME)
5762

5863
testdata/vmlinux:
59-
$(curl) -o $@ https://s3.amazonaws.com/spec.ccfc.min/img/hello/kernel/hello-vmlinux.bin
60-
61-
testdata/firecracker:
62-
$(curl) -o $@ https://github.com/firecracker-microvm/firecracker/releases/download/$(firecracker_version)/firecracker-$(firecracker_version)-x86_64
63-
chmod +x $@
64+
$(curl) -o $@ https://s3.amazonaws.com/spec.ccfc.min/img/quickstart_guide/$(arch)/kernels/vmlinux.bin
6465

65-
testdata/jailer:
66-
$(curl) -o $@ https://github.com/firecracker-microvm/firecracker/releases/download/$(firecracker_version)/jailer-$(firecracker_version)-x86_64
67-
chmod +x $@
66+
testdata/binaries:
67+
$(curl) -o testdata/firecracker.tgz ${release_url}
68+
tar -xvzf testdata/firecracker.tgz -C ./testdata
69+
mv testdata/firecracker-$(firecracker_version)-$(arch) testdata/firecracker
70+
mv testdata/jailer-$(firecracker_version)-$(arch) testdata/jailer
71+
chmod +x testdata/firecracker
72+
chmod +x testdata/jailer
73+
touch testdata/binaries
6874

6975
testdata/root-drive.img:
7076
$(curl) -o $@ https://s3.amazonaws.com/spec.ccfc.min/img/hello/fsfiles/hello-rootfs.ext4
@@ -103,4 +109,4 @@ firecracker-clean:
103109
cargo clean
104110
- rm $(FIRECRACKER_BIN) $(JAILER_BIN)
105111

106-
.PHONY: all generate clean distclean build test unit-tests all-tests check-kvm
112+
.PHONY: all generate clean distclean build test unit-tests all-tests check-kvm

machine_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ func TestLogAndMetrics(t *testing.T) {
431431
t.Run(test.logLevel, func(t *testing.T) {
432432
out := testLogAndMetrics(t, test.logLevel)
433433
if test.quiet {
434-
assert.Regexp(t, `^Running Firecracker v0\.\d+\.0`, out)
434+
assert.Regexp(t, `^Running Firecracker v0\.\d+\.\d+`, out)
435435
return
436436
}
437437

0 commit comments

Comments
 (0)