Skip to content

Commit

Permalink
Fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ultimaweapon committed Jan 11, 2025
1 parent dd9b1a2 commit a181aa0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Build
run: ./build.py -r
- name: Run tests
run: cargo test --workspace --exclude gui --exclude kernel
run: cargo test
- name: Create distribution tarball
run: |
ln -sr dist/bin/obliteration dist/obliteration
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Build
run: ./build.py -r
- name: Run tests
run: cargo test --workspace --exclude gui --exclude kernel
run: cargo test
- name: Create Apple Disk Image
run: hdiutil create -volname Obliteration -srcfolder dist Obliteration.dmg
- name: Upload artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Build
run: python3 build.py -r
- name: Run tests
run: cargo test --workspace --exclude gui --exclude kernel
run: cargo test
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
7 changes: 0 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@
"[toml]": {
"editor.formatOnSave": true
},
"clangd.arguments": [
"--header-insertion=never"
],
"cmake.configureOnOpen": true,
"cmake.debugConfig": {
"cwd": "${workspaceFolder}"
},
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
Expand Down
1 change: 1 addition & 0 deletions lib/krt/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub fn config() -> &'static Config {
/// # Safety
/// This function must be called immediately in the [_start](super::_start) function. After that it
/// must never be called again.
#[allow(dead_code)]
pub(super) unsafe fn setup(env: &'static BootEnv, conf: &'static Config) {
BOOT_ENV = env;
CONFIG = conf;
Expand Down
6 changes: 3 additions & 3 deletions lib/krt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
pub use self::config::*;
pub use self::console::*;

use ::config::{BootEnv, Config};
use core::panic::PanicInfo;

mod config;
Expand All @@ -25,8 +24,8 @@ mod panic;
/// space.
/// 2. Interrupt is disabled.
/// 3. Only main CPU can execute this function.
#[no_mangle]
extern "C" fn _start(env: &'static BootEnv, conf: &'static Config) -> ! {
#[cfg(target_os = "none")]
extern "C" fn _start(env: &'static ::config::BootEnv, conf: &'static ::config::Config) -> ! {
// SAFETY: We call it as the first thing here.
unsafe { self::config::setup(env, conf) };
main();
Expand All @@ -45,6 +44,7 @@ fn panic(i: &PanicInfo) -> ! {
self::panic::panic();
}

#[cfg(target_os = "none")]
unsafe extern "Rust" {
safe fn main() -> !;
}

0 comments on commit a181aa0

Please sign in to comment.