mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-09 13:26:48 +00:00
Use dummy tests for other boot protocols
This commit is contained in:
parent
a532340c65
commit
33ec7dec02
32
.github/workflows/integration_test.yml
vendored
Normal file
32
.github/workflows/integration_test.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: Integration test
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 15
|
||||||
|
container: jinuxdev/jinux:0.2.1
|
||||||
|
steps:
|
||||||
|
- run: echo "Running in jinuxdev/jinux:0.2.1"
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Boot Test (Multiboot)
|
||||||
|
id: boot_test_mb
|
||||||
|
run: RUSTFLAGS="-C opt-level=1" make run AUTO_TEST=dummy ENABLE_KVM=0 BOOT_PROTOCOL=multiboot
|
||||||
|
|
||||||
|
- name: Boot Test (Multiboot2)
|
||||||
|
id: boot_test_mb2
|
||||||
|
run: RUSTFLAGS="-C opt-level=1" make run AUTO_TEST=dummy ENABLE_KVM=0 BOOT_PROTOCOL=multiboot2
|
||||||
|
|
||||||
|
- name: Syscall Test (Linux Boot Protocol)
|
||||||
|
id: syscall_test_linux
|
||||||
|
run: RUSTFLAGS="-C opt-level=1" make run AUTO_TEST=syscall ENABLE_KVM=0 BOOT_PROTOCOL=linux
|
||||||
|
|
||||||
|
# TODO: include the integration tests for MicroVM, which is not ready yet.
|
32
.github/workflows/syscall_test.yml
vendored
32
.github/workflows/syscall_test.yml
vendored
@ -1,32 +0,0 @@
|
|||||||
name: Syscall test
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/*
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 15
|
|
||||||
container: jinuxdev/jinux:0.2.1
|
|
||||||
steps:
|
|
||||||
- run: echo "Running in jinuxdev/jinux:0.2.1"
|
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Syscall Test (Multiboot)
|
|
||||||
id: syscall_test_mb
|
|
||||||
run: RUSTFLAGS="-C opt-level=1" make run AUTO_SYSCALL_TEST=1 ENABLE_KVM=0 SKIP_GRUB_MENU=1 BOOT_METHOD=qemu-grub BOOT_PROTOCOL=multiboot
|
|
||||||
|
|
||||||
- name: Syscall Test (Multiboot2)
|
|
||||||
id: syscall_test_mb2
|
|
||||||
run: RUSTFLAGS="-C opt-level=1" make run AUTO_SYSCALL_TEST=1 ENABLE_KVM=0 SKIP_GRUB_MENU=1 BOOT_METHOD=qemu-grub BOOT_PROTOCOL=multiboot2
|
|
||||||
|
|
||||||
- name: Syscall Test (Linux Boot Protocol)
|
|
||||||
id: syscall_test_lbp
|
|
||||||
run: RUSTFLAGS="-C opt-level=1" make run AUTO_SYSCALL_TEST=1 ENABLE_KVM=0 SKIP_GRUB_MENU=1 BOOT_METHOD=qemu-grub BOOT_PROTOCOL=linux
|
|
||||||
|
|
||||||
# TODO: include the integration tests for MicroVM, which is not ready yet.
|
|
14
Makefile
14
Makefile
@ -1,5 +1,5 @@
|
|||||||
# Make arguments and their defaults
|
# Make arguments and their defaults
|
||||||
AUTO_SYSCALL_TEST ?= 0
|
AUTO_TEST ?= 0
|
||||||
BOOT_METHOD ?= qemu-grub
|
BOOT_METHOD ?= qemu-grub
|
||||||
BOOT_PROTOCOL ?= multiboot2
|
BOOT_PROTOCOL ?= multiboot2
|
||||||
BUILD_SYSCALL_TEST ?= 0
|
BUILD_SYSCALL_TEST ?= 0
|
||||||
@ -8,22 +8,22 @@ ENABLE_KVM ?= 1
|
|||||||
GDB_CLIENT ?= 0
|
GDB_CLIENT ?= 0
|
||||||
GDB_SERVER ?= 0
|
GDB_SERVER ?= 0
|
||||||
INTEL_TDX ?= 0
|
INTEL_TDX ?= 0
|
||||||
SKIP_GRUB_MENU ?= 0
|
SKIP_GRUB_MENU ?= 1
|
||||||
# End of Make arguments
|
# End of Make arguments
|
||||||
|
|
||||||
KERNEL_CMDLINE := SHELL="/bin/sh" LOGNAME="root" HOME="/" USER="root" PATH="/bin" init=/usr/bin/busybox -- sh -l
|
KERNEL_CMDLINE := SHELL="/bin/sh" LOGNAME="root" HOME="/" USER="root" PATH="/bin" init=/usr/bin/busybox -- sh -l
|
||||||
ifeq ($(AUTO_SYSCALL_TEST), 1)
|
ifeq ($(AUTO_TEST), syscall)
|
||||||
|
BUILD_SYSCALL_TEST := 1
|
||||||
KERNEL_CMDLINE += /opt/syscall_test/run_syscall_test.sh
|
KERNEL_CMDLINE += /opt/syscall_test/run_syscall_test.sh
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(AUTO_TEST), dummy)
|
||||||
|
KERNEL_CMDLINE += -c exit 0
|
||||||
|
endif
|
||||||
|
|
||||||
CARGO_KBUILD_ARGS :=
|
CARGO_KBUILD_ARGS :=
|
||||||
|
|
||||||
CARGO_KRUN_ARGS := -- '$(KERNEL_CMDLINE)'
|
CARGO_KRUN_ARGS := -- '$(KERNEL_CMDLINE)'
|
||||||
|
|
||||||
ifeq ($(AUTO_SYSCALL_TEST), 1)
|
|
||||||
BUILD_SYSCALL_TEST := 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
CARGO_KRUN_ARGS += --boot-method="$(BOOT_METHOD)"
|
CARGO_KRUN_ARGS += --boot-method="$(BOOT_METHOD)"
|
||||||
CARGO_KRUN_ARGS += --boot-protocol="$(BOOT_PROTOCOL)"
|
CARGO_KRUN_ARGS += --boot-protocol="$(BOOT_PROTOCOL)"
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ cargo component-check
|
|||||||
|
|
||||||
This command will build the syscall test binary and automatically run Jinux with the tests using QEMU.
|
This command will build the syscall test binary and automatically run Jinux with the tests using QEMU.
|
||||||
```bash
|
```bash
|
||||||
make run AUTO_SYSCALL_TEST=1
|
make run AUTO_TEST=syscall
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, if you wish to test it interactively inside a shell in Jinux.
|
Alternatively, if you wish to test it interactively inside a shell in Jinux.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user