Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
rcore-os
RCore Tutorial V3
提交
07675fcd
R
RCore Tutorial V3
项目概览
rcore-os
/
RCore Tutorial V3
上一次同步 1 年多
通知
15
Star
793
Fork
260
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
RCore Tutorial V3
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
07675fcd
编写于
5月 15, 2022
作者:
weixin_49256325
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add ci tests update usertests
上级
8e73480c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
87 addition
and
34 deletion
+87
-34
.github/workflows/doc-and-test.yml
.github/workflows/doc-and-test.yml
+39
-18
.gitignore
.gitignore
+7
-12
.vscode/settings.json
.vscode/settings.json
+10
-0
user/src/bin/usertests.rs
user/src/bin/usertests.rs
+31
-4
未找到文件。
.github/workflows/doc-and-test.yml
浏览文件 @
07675fcd
...
...
@@ -9,37 +9,58 @@ jobs:
build-doc
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v3
-
uses
:
actions-rs/toolchain@v1
with
:
profile
:
minimal
toolchain
:
nightly-2022-04-11
components
:
rust-src, llvm-tools-preview
target
:
riscv64gc-unknown-none-elf
-
name
:
Build doc
run
:
|
rustup target add riscv64gc-unknown-none-elf
rustup component add llvm-tools-preview
rustup component add rust-src
cd os
cargo doc --no-deps --verbose
run
:
cd os && cargo doc --no-deps --verbose
-
name
:
Deploy to Github Pages
uses
:
peaceiris/actions-gh-pages@v3
with
:
github_token
:
${{ secrets.GITHUB_TOKEN }}
publish_dir
:
./os/target/riscv64gc-unknown-none-elf/doc
destination_dir
:
${{ github.ref_name }}
run-tests
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v3
-
uses
:
actions-rs/toolchain@v1
with
:
profile
:
minimal
toolchain
:
nightly-2022-04-11
components
:
rust-src, llvm-tools-preview
target
:
riscv64gc-unknown-none-elf
-
uses
:
actions-rs/install@v0.1
with
:
crate
:
cargo-binutils
version
:
latest
use-tool-cache
:
true
-
name
:
Cache QEMU
uses
:
actions/cache@v3
with
:
path
:
qemu-7.0.0
key
:
qemu-7.0.0-x86_64-riscv64
-
name
:
Install QEMU
run
:
|
sudo apt-get update
sudo apt-get install ninja-build -y
[ ! -d qemu-6.1.0 ] && wget https://download.qemu.org/qemu-6.1.0.tar.xz \
&& tar xJf qemu-6.1.0.tar.xz > /dev/null \
&& cd qemu-6.1.0 && ./configure --target-list=riscv64-softmmu && cd ..
cd qemu-6.1.0 && sudo make install -j
if [ ! -d qemu-7.0.0 ]; then
wget https://download.qemu.org/qemu-7.0.0.tar.xz
tar -xf qemu-7.0.0.tar.xz
cd qemu-7.0.0
./configure --target-list=riscv64-softmmu
make -j
else
cd qemu-7.0.0
fi
sudo make install
qemu-system-riscv64 --version
-
name
:
Run usertests
run
:
|
cd os && make run TEST=1
\ No newline at end of file
-
name
:
Run usertests
run
:
cd os && make run TEST=1
timeout-minutes
:
10
.gitignore
浏览文件 @
07675fcd
.idea/*
os/target/*
os/.idea/*
.*/*
!.github/*
!.vscode/settings.json
**/target/
**/Cargo.lock
os/src/link_app.S
os/src/linker.ld
os/last-*
os/Cargo.lock
os/last-*
os/.gdb_history
user/target/*
user/.idea/*
user/Cargo.lock
easy-fs/Cargo.lock
easy-fs/target/*
easy-fs-fuse/Cargo.lock
easy-fs-fuse/target/*
tools/
pushall.sh
.vscode/settings.json
0 → 100644
浏览文件 @
07675fcd
{
//
Prevent
"can't find crate for `test`"
error
on
no_std
//
Ref:
https://github.com/rust-lang/vscode-rust/issues/
729
//
For
vscode-rust
plugin
users:
"rust.target"
:
"riscv64gc-unknown-none-elf"
,
"rust.all_targets"
:
false
,
//
For
Rust
Analyzer
plugin
users:
"rust-analyzer.cargo.target"
:
"riscv64gc-unknown-none-elf"
,
"rust-analyzer.checkOnSave.allTargets"
:
false
}
user/src/bin/usertests.rs
浏览文件 @
07675fcd
...
...
@@ -5,19 +5,46 @@
extern
crate
user_lib
;
static
SUCC_TESTS
:
&
[
&
str
]
=
&
[
"matrix
\0
"
,
"exit
\0
"
,
"fantastic_text
\0
"
,
"filetest_simple
\0
"
,
"forktest_simple
\0
"
,
"forktest
\0
"
,
"forktest2
\0
"
,
"forkt
est_simpl
e
\0
"
,
"forkt
re
e
\0
"
,
"hello_world
\0
"
,
"matrix
\0
"
,
"huge_write
\0
"
,
"mpsc_sem
\0
"
,
"phil_din_mutex
\0
"
,
"pipe_large_test
\0
"
,
"pipetest
\0
"
,
"race_adder_atomic
\0
"
,
"race_adder_mutex_blocking
\0
"
,
"race_adder_mutex_spin
\0
"
,
"race_adder_arg
\0
"
,
"sleep_simple
\0
"
,
"sleep
\0
"
,
"sleep_simple
\0
"
,
"sync_sem
\0
"
,
"test_condvar
\0
"
,
"threads_arg
\0
"
,
"threads
\0
"
,
"yield
\0
"
,
"run_pipe_test
\0
"
,
];
static
FAIL_TESTS
:
&
[
&
str
]
=
&
[
"stack_overflow
\0
"
,
"race_adder_loop
\0
"
,
"priv_csr
\0
"
,
"priv_inst
\0
"
,
"store_fault
\0
"
,
"until_timeout
\0
"
,
"stack_overflow
\0
"
,
"race_adder
\0
"
,
"huge_write_mt
\0
"
,
];
static
FAIL_TESTS
:
&
[
&
str
]
=
&
[
"stack_overflow
\0
"
];
use
user_lib
::{
exec
,
fork
,
waitpid
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录