Skip to content

Commit c092cb9

Browse files
mtjhrcslp
authored andcommitted
tests: skip guest unit tests on non-Linux hosts
Guest code may use Linux-only libc calls that won't compile with other toolchains. Signed-off-by: Matej Hrica <[email protected]>
1 parent 6937e84 commit c092cb9

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/run.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ fi
2424

2525
GUEST_TARGET="${ARCH}-unknown-linux-musl"
2626

27-
# Run the unit tests first (this tests the testing framework itself not libkrun)
28-
cargo test -p test_cases --features guest
27+
# Run the unit tests first (this tests the testing framework itself not libkrun).
28+
# Guest code may use Linux-only libc calls that won't compile with other toolchains.
29+
if [ "$OS" = "Linux" ]; then
30+
cargo test -p test_cases --features guest
31+
fi
2932

3033
# On macOS, we need to cross-compile for Linux musl
3134
if [ "$OS" = "Darwin" ]; then

0 commit comments

Comments
 (0)