Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ qemu.log
rusty-tags.vi
/.project*
/.axconfig.*
/crates
/coverage_report
63 changes: 53 additions & 10 deletions Cargo.lock

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

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ members = [
"ulib/axstd",
"ulib/axlibc",

"examples/axtest-runner",
"examples/helloworld",
"examples/helloworld-myplat",
"examples/httpclient",
Expand Down Expand Up @@ -66,6 +67,8 @@ axsync = { path = "modules/axsync" }
axtask = { path = "modules/axtask" }
axdma = { path = "modules/axdma" }
axipi = { path = "modules/axipi" }
axtest = { path = "crates/axtest/axtest" }
axtest_macros = { path = "crates/axtest/axtest_macros" }
Comment on lines +70 to +71

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

axtest and axtest_macros are added as workspace path dependencies under crates/axtest/..., but there is no crates/ directory in the repository checkout. This will make the workspace fail to resolve dependencies. Either vendor/commit those crates into crates/axtest/ (or add a submodule + ensure CI checks it out), or switch these to a git/registry dependency.

Suggested change
axtest = { path = "crates/axtest/axtest" }
axtest_macros = { path = "crates/axtest/axtest_macros" }
axtest = "0.2.0"
axtest_macros = "0.2.0"

Copilot uses AI. Check for mistakes.

[profile.release]
lto = true
lto = true
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
# - `A` or `APP`: Path to the application
# - `FEATURES`: Features os ArceOS modules to be enabled.
# - `APP_FEATURES`: Features of (rust) apps to be enabled.
# - `AX_TEST`: Enable axtest cfg injection for Rust apps (`RUSTFLAGS += --cfg axtest`)
# - `AX_TEST_COV`: Enable LLVM coverage instrumentation for axtest Rust apps.
# * QEMU options:
# - `BLK`: Enable storage devices (virtio-blk)
# - `NET`: Enable network devices (virtio-net)
Expand Down Expand Up @@ -54,6 +56,8 @@ A ?= examples/helloworld
APP ?= $(A)
FEATURES ?=
APP_FEATURES ?=
AX_TEST ?= n
AX_TEST_COV ?= n

# QEMU options
BLK ?= n
Expand Down Expand Up @@ -88,7 +92,7 @@ endif

.DEFAULT_GOAL := all

ifneq ($(filter $(or $(MAKECMDGOALS), $(.DEFAULT_GOAL)), all build disasm run justrun debug defconfig oldconfig),)
ifneq ($(filter $(or $(MAKECMDGOALS), $(.DEFAULT_GOAL)), all build disasm run justrun debug coverage print_out_elf defconfig oldconfig),)
# Install dependencies
include scripts/make/deps.mk
# Platform resolving
Expand Down Expand Up @@ -180,6 +184,9 @@ run: build justrun
justrun:
$(call run_qemu)

coverage:
scripts/coverage/coverage-report.sh "$(DISK_IMG)" "$(OUT_ELF)" "$(PWD)/coverage_report"

debug: build
$(call run_qemu_debug) &
sleep 1
Expand Down Expand Up @@ -230,6 +237,6 @@ clean_c::
rm -rf $(app-objs)

.PHONY: all defconfig oldconfig \
build disasm run justrun debug \
build disasm run justrun debug coverage print_out_elf \
clippy doc doc_check_missing fmt fmt_c unittest unittest_no_fail_fast \
disk_img clean clean_c
26 changes: 26 additions & 0 deletions examples/axtest-runner/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "axtest-runner"
version = "0.1.0"
edition.workspace = true
authors = ["Debin <luodeb@outlook.com>"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
use-ramfs = ["axstd/myfs", "dep:axfs_vfs", "dep:axfs_ramfs", "dep:crate_interface"]
axtest_cov = []
default = []

[dependencies]
log = "0.4"
axfs_vfs = { version = "0.1", optional = true }
axfs_ramfs = { version = "0.1", optional = true }
crate_interface = { version = "0.3", optional = true }
axstd = { workspace = true, features = ["alloc", "fs", "multitask", "fp-simd"] }
axlog = { workspace = true }
axtest = { workspace = true }
arceos_api = { workspace = true }
# minicov = { version = "0.3", optional = true } # TODO: Compile error on riscv64

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(axtest)'] }
Loading
Loading