Skip to content

Commit

Permalink
Merge branch 'theseus_main' into remove-unrunnable-task-from-run-queue
Browse files Browse the repository at this point in the history
Signed-off-by: Klimenty Tsoutsman <klim@tsoutsman.com>
  • Loading branch information
tsoutsman committed Oct 7, 2023
2 parents cfac9cd + e9416d6 commit 232949d
Show file tree
Hide file tree
Showing 60 changed files with 1,131 additions and 428 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check-clippy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
run: |
git submodule update --init --recursive
- name: "Install nasm"
run: sudo apt install nasm
run: |
sudo apt update
sudo apt install nasm
- name: "Run Clippy"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: .
run: |
make clippy ARCH=x86_64
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ jobs:
submodules: recursive

- name: "Install nasm"
run: sudo apt install nasm
run: |
sudo apt update
sudo apt install nasm
- name: Cache build artifacts
uses: actions/cache@v3
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: QEMU Test
on:
pull_request:
types: [synchronize, opened, reopened]
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Initialize git submodules"
run: |
git submodule update --init --recursive
- name: "Install dependencies"
run: |
sudo apt update
sudo apt install make gcc nasm pkg-config grub-pc-bin mtools xorriso qemu qemu-kvm wget
- name: "Run tests"
working-directory: .
run: make test
timeout-minutes: 10
106 changes: 69 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1079,3 +1079,14 @@ endif
@sudo cp -vf $(iso) /var/lib/tftpboot/theseus/
@sudo systemctl restart isc-dhcp-server
@sudo systemctl restart tftpd-hpa

test: export override QEMU_FLAGS += -device isa-debug-exit,iobase=0xf4,iosize=0x04
test: export override QEMU_FLAGS += -nographic
test: export override FEATURES =--features theseus_tests --features first_application/qemu_test
test: $(iso)
# We exit with an exit code of 0 if QEMU's exit code is 17, and 2 otherwise.
# This is because `qemu_test` uses a value of 0x11 to indicate success.
$(QEMU_BIN) $(QEMU_FLAGS); \
EXIT_CODE=$$?; \
test $$EXIT_CODE -eq 17 && exit 0; \
exit 2
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![Documentation](https://img.shields.io/badge/view-docs-blue)](https://theseus-os.github.io/Theseus/doc/___Theseus_Crates___/index.html)
[![Book](https://img.shields.io/badge/view-book-blueviolet)](https://theseus-os.github.io/Theseus/book/index.html)
[![Blog](https://img.shields.io/badge/view-blog-orange)](https://theseus-os.com)
[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?style=flat&logo=discord&logoColor=white)](https://discord.gg/NuUnqeYT8R)

Theseus is a new OS written from scratch in [Rust](https://www.rust-lang.org/) to experiment with novel OS structure, better state management, and how to leverage **intralingual design** principles to shift OS responsibilities like resource management into the compiler.

Expand Down
13 changes: 13 additions & 0 deletions applications/qemu_test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "qemu_test"
version = "0.1.0"
authors = ["Klim Tsoutsman <klim@tsoutsman.com>"]
description = "Automated test runner"
edition = "2021"

[dependencies]
app_io = { path = "../../kernel/app_io" }
path = { path = "../../kernel/path" }
qemu-exit = "3.0.2"
spawn = { path = "../../kernel/spawn" }
task = { path = "../../kernel/task" }
Loading

0 comments on commit 232949d

Please sign in to comment.