mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Compare commits
6 Commits
8d1d898ece
...
a49df94a8d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a49df94a8d | ||
|
|
684ef64767 | ||
|
|
87d0ce5fa2 | ||
|
|
5b67cb05ff | ||
|
|
81b7829657 | ||
|
|
7ce356f99d |
@@ -426,7 +426,7 @@ warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
|
|||||||
要让在 QEMU 中运行内核更轻松,我们可以设置在 cargo 配置文件中设置 `runner` 配置项:
|
要让在 QEMU 中运行内核更轻松,我们可以设置在 cargo 配置文件中设置 `runner` 配置项:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
# in .cargo/config
|
# in .cargo/config.toml
|
||||||
|
|
||||||
[target.'cfg(target_os = "none")']
|
[target.'cfg(target_os = "none")']
|
||||||
runner = "bootimage runner"
|
runner = "bootimage runner"
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ error[E0463]: can't find crate for `test`
|
|||||||
#![test_runner(crate::test_runner)]
|
#![test_runner(crate::test_runner)]
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
fn test_runner(tests: &[&dyn Fn()]) {
|
pub fn test_runner(tests: &[&dyn Fn()]) {
|
||||||
println!("Running {} tests", tests.len());
|
println!("Running {} tests", tests.len());
|
||||||
for test in tests {
|
for test in tests {
|
||||||
test();
|
test();
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ error[E0463]: can't find crate for `test`
|
|||||||
#![test_runner(crate::test_runner)]
|
#![test_runner(crate::test_runner)]
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
fn test_runner(tests: &[&dyn Fn()]) {
|
pub fn test_runner(tests: &[&dyn Fn()]) {
|
||||||
println!("Running {} tests", tests.len());
|
println!("Running {} tests", tests.len());
|
||||||
for test in tests {
|
for test in tests {
|
||||||
test();
|
test();
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ To implement a custom test framework for our kernel, we add the following to our
|
|||||||
#![test_runner(crate::test_runner)]
|
#![test_runner(crate::test_runner)]
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
fn test_runner(tests: &[&dyn Fn()]) {
|
pub fn test_runner(tests: &[&dyn Fn()]) {
|
||||||
println!("Running {} tests", tests.len());
|
println!("Running {} tests", tests.len());
|
||||||
for test in tests {
|
for test in tests {
|
||||||
test();
|
test();
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ error[E0463]: can't find crate for `test`
|
|||||||
#![test_runner(crate::test_runner)]
|
#![test_runner(crate::test_runner)]
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
fn test_runner(tests: &[&dyn Fn()]) {
|
pub fn test_runner(tests: &[&dyn Fn()]) {
|
||||||
println!("Running {} tests", tests.len());
|
println!("Running {} tests", tests.len());
|
||||||
for test in tests {
|
for test in tests {
|
||||||
test();
|
test();
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
{% if search_term is number %}
|
{% if search_term is number %}
|
||||||
{% set discussion_url = "https://github.com/phil-opp/blog_os/discussions/" ~ search_term %}
|
{% set discussion_url = "https://github.com/phil-opp/blog_os/discussions/" ~ search_term %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set search_term_encoded = `"` ~ search_term ~ `"` | urlencode %}
|
{% set search_term_encoded = `"` ~ search_term ~ `"` ~ ` in:title` | urlencode %}
|
||||||
{% set discussion_url = `https://github.com/phil-opp/blog_os/discussions/categories/` ~ category_path ~ `?discussions_q=` ~ search_term_encoded %}
|
{% set discussion_url = `https://github.com/phil-opp/blog_os/discussions/categories/` ~ category_path ~ `?discussions_q=` ~ search_term_encoded %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user