Skip to content

Commit

Permalink
Allow running 'utest' on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jablonskim committed Aug 10, 2023
1 parent 37507aa commit 3433097
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ unstable = []
[[test]]
name = "kvm"
path = "tests/kvm/bin.rs"
required-features = ["vmtest"]

[build-dependencies]
phf_codegen = { version = "0.9.0", optional = true }
Expand Down
3 changes: 2 additions & 1 deletion src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ mod test {

// Check TSC AUX is correct (currently when using Linux only):
// See also: https://elixir.bootlin.com/linux/v5.18.8/source/arch/x86/include/asm/segment.h#L241
if cfg!(target_os = "linux") {
#[cfg(target_os = "linux")]
{
let mut cpu: u32 = 0;
let mut node: u32 = 0;
libc::syscall(libc::SYS_getcpu, &mut cpu, &mut node, 0);
Expand Down
1 change: 1 addition & 0 deletions tests/no_std_build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(target_family = "unix")]
#![feature(start, libc)]
#![no_std]

Expand Down

0 comments on commit 3433097

Please sign in to comment.